Package org.zkoss.zul.theme
Class DesktopThemeRegistry
java.lang.Object
org.zkoss.zul.theme.DesktopThemeRegistry
- All Implemented Interfaces:
ThemeRegistry
- Direct Known Subclasses:
ResponsiveThemeRegistry
A standard implementation of ThemeRegistry, used in ZK CE/PE
Used to keep track of a list of available desktop themes to apply
- Since:
- 6.5.2
- Author:
- neillee
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize the registry with the default theme (a.k.a Breeze). -
Method Summary
Modifier and TypeMethodDescriptionbooleanderegister(Theme theme) Remove a theme from the list of available desktop themesReturns the desktop theme with the given nameTheme[]Returns a list of currently registered desktop themesbooleanCheck if a dekstop theme with the given name is available to usebooleanRegister a desktop theme.
-
Constructor Details
-
DesktopThemeRegistry
public DesktopThemeRegistry()Initialize the registry with the default theme (a.k.a Breeze).- Since:
- 6.5.2
-
-
Method Details
-
register
Register a desktop theme.- Specified by:
registerin interfaceThemeRegistry- Parameters:
theme- an instance of StandardTheme- Returns:
- true if registration is successful; false if failed
-
deregister
Remove a theme from the list of available desktop themes- Specified by:
deregisterin interfaceThemeRegistry- Parameters:
theme- the theme to be removed- Returns:
- true if the theme is successfully removed; false if failed
-
getThemes
Returns a list of currently registered desktop themes- Specified by:
getThemesin interfaceThemeRegistry- Returns:
- the list of currently registered desktop themes
-
hasTheme
Check if a dekstop theme with the given name is available to use- Specified by:
hasThemein interfaceThemeRegistry- Parameters:
themeName- the name of the theme- Returns:
- true if theme is found; false otherwise
-
getTheme
Returns the desktop theme with the given name- Specified by:
getThemein interfaceThemeRegistry- Parameters:
themeName- theme name- Returns:
- an instance of Theme with the given name or null if the registry does not have a theme that goes by that name
-