Package org.adempiere.webui.theme
Class ThemeManager
java.lang.Object
org.adempiere.webui.theme.ThemeManager
Static methods for web client theme.
- Author:
- hengsin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet browser tab icon URLstatic StringGet title text for browser tabstatic org.zkoss.image.ImageGet tenant web logi imagestatic StringgetIconSclass(String imagePath) Translate image name to font icon namestatic StringGet large logo URLstatic StringGet theme preference URLstatic StringGet small logo URLstatic Stringstatic StringgetStyleSheet(String theme) static StringGet theme stylesheet URL for specific browsersstatic StringgetTheme()Get name of active themestatic StringgetThemeResource(String name) Get theme resource URLstatic StringGet user define style sheetstatic BooleanIs current theme has custom CSS fragmentstatic booleanIs use CSS to define size of dialogstatic booleanIs use font iconstatic StringtoClassPathResourcePath(String zkResourceURL) Convert zkResourceURL to class path resource URL (if URL start with ~./)
-
Field Details
-
ZK_PREFIX_FOR_CLASSPATH_RESOURCE
- See Also:
-
ZK_URL_PREFIX_FOR_CLASSPATH_RESOURCE
- See Also:
-
THEME_PATH_PREFIX
-
-
Constructor Details
-
ThemeManager
public ThemeManager()
-
-
Method Details
-
getLargeLogo
Get large logo URL- Returns:
- url for large logo
-
getSmallLogo
Get small logo URL- Returns:
- url for small logo
-
getTheme
Get name of active theme- Returns:
- name of active theme
-
getStyleSheet
- Returns:
- url of active theme stylesheet
-
getStyleSheet
- Returns:
- url of theme stylesheet
-
getUserDefineStyleSheet
Get user define style sheet- Returns:
- user define style sheet
-
getStyleSheetByBrowser
Get theme stylesheet URL for specific browsers- Returns:
- url of theme stylesheet by browser
-
getPreference
Get theme preference URL- Returns:
- url of theme preference page
-
getBrowserTitle
Get title text for browser tab- Returns:
- title text for browser tab
-
getBrowserIcon
Get browser tab icon URL- Returns:
- url for browser icon
-
getThemeResource
Get theme resource URL- Parameters:
name- relative resource name from theme root (can be overwritten using Theme Variation, see https://idempiere.atlassian.net/browse/IDEMPIERE-6293)- Returns:
- full resource url
-
getClientWebLogo
Get tenant web logi image- Returns:
- tenant web logo if available
- Throws:
IOException
-
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
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
Translate image name to font icon name- Parameters:
imagePath-- Returns:
- font icon css class name
-