Class ThemeManager

java.lang.Object
org.adempiere.webui.theme.ThemeManager

public final class ThemeManager extends Object
Static methods for web client theme.
Author:
hengsin
  • Field Details

    • ZK_PREFIX_FOR_CLASSPATH_RESOURCE

      public static final String ZK_PREFIX_FOR_CLASSPATH_RESOURCE
      See Also:
    • ZK_URL_PREFIX_FOR_CLASSPATH_RESOURCE

      public static final String ZK_URL_PREFIX_FOR_CLASSPATH_RESOURCE
      See Also:
    • THEME_PATH_PREFIX

      public static String THEME_PATH_PREFIX
  • Constructor Details

    • ThemeManager

      public ThemeManager()
  • Method Details

    • getLargeLogo

      public static String getLargeLogo()
      Get large logo URL
      Returns:
      url for large logo
    • getSmallLogo

      public static String getSmallLogo()
      Get small logo URL
      Returns:
      url for small logo
    • getTheme

      public static String getTheme()
      Get name of active theme
      Returns:
      name of active theme
    • getStyleSheet

      public static String getStyleSheet()
      Get theme stylesheet URL
      Returns:
      url of theme stylesheet
    • getStyleSheetByBrowser

      public static String getStyleSheetByBrowser()
      Get theme stylesheet URL for specific browsers
      Returns:
      url of theme stylesheet by browser
    • getPreference

      public static String getPreference()
      Get theme preference URL
      Returns:
      url of theme preference page
    • getBrowserTitle

      public static String getBrowserTitle()
      Get title text for browser tab
      Returns:
      title text for browser tab
    • getBrowserIcon

      public static String getBrowserIcon()
      Get browser tab icon URL
      Returns:
      url for browser icon
    • getThemeResource

      public static String getThemeResource(String name)
      Get theme resource URL
      Parameters:
      name - relative resource name from theme root
      Returns:
      full resource url
    • getClientWebLogo

      public static org.zkoss.image.Image getClientWebLogo() throws IOException
      Get tenant web logi image
      Returns:
      tenant web logo if available
      Throws:
      IOException
    • isThemeHasCustomCSSFragment

      public static Boolean isThemeHasCustomCSSFragment()
      Is current theme has custom CSS fragment
      Returns:
      true if custom css ({theme}/css/fragment/custom.css.dsp) exists
    • isUseCSSForWindowSize

      public static boolean isUseCSSForWindowSize()
      Is use CSS to define size of dialog
      Returns:
      true if css is use to define size of dialog
    • isUseFontIconForImage

      public static boolean isUseFontIconForImage()
      Is use font icon
      Returns:
      true if use font icon instead of image
    • toClassPathResourcePath

      public static String toClassPathResourcePath(String zkResourceURL)
      Convert zkResourceURL to class path resource URL (if URL start with ~./)
      Parameters:
      zkResourceURL - zk resource url for classpath resources (url start with ~./)
      Returns:
      Resource path for lookup/loading through class loader (absolute path start with /web)
    • getIconSclass

      public static String getIconSclass(String imagePath)
      Translate image name to font icon name
      Parameters:
      imagePath -
      Returns:
      font icon css class name