Class ThemeManager


  • public final class ThemeManager
    extends Object
    Author:
    hengsin
    • Field Detail

      • ZK_URL_PREFIX_FOR_CLASSPATH_RESOURCE

        public static final String ZK_URL_PREFIX_FOR_CLASSPATH_RESOURCE
        See Also:
        Constant Field Values
      • THEME_PATH_PREFIX

        public static String THEME_PATH_PREFIX
    • Constructor Detail

      • ThemeManager

        public ThemeManager()
    • Method Detail

      • 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 the browser window
      • 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 exists
      • isUseCSSForWindowSize

        public static boolean isUseCSSForWindowSize()
      • isUseFontIconForImage

        public static boolean isUseFontIconForImage()
      • 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)