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()
      Returns:
      url for large logo
    • getSmallLogo

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

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

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

      public static String getStyleSheetByBrowser()
      Returns:
      url of theme stylesheet by browser
    • getPreference

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

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

      public static String getBrowserIcon()
      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
      Returns:
      client web logo if available
      Throws:
      IOException
    • isThemeHasCustomCSSFragment

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

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

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

      public static String toClassPathResourcePath(String zkResourceURL)
      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