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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get browser tab icon URLstatic String
Get title text for browser tabstatic org.zkoss.image.Image
Get tenant web logi imagestatic String
getIconSclass
(String imagePath) Translate image name to font icon namestatic String
Get large logo URLstatic String
Get theme preference URLstatic String
Get small logo URLstatic String
static String
getStyleSheet
(String theme) static String
Get theme stylesheet URL for specific browsersstatic String
getTheme()
Get name of active themestatic String
getThemeResource
(String name) Get theme resource URLstatic String
Get user define style sheetstatic Boolean
Is current theme has custom CSS fragmentstatic boolean
Is use CSS to define size of dialogstatic boolean
Is use font iconstatic String
toClassPathResourcePath
(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
-