Package org.zkoss.web.theme
Interface ThemeRegistry
public interface ThemeRegistry
Used to store a list of themes available to the web application.
Themes should be registered before they could be used.
User could define their own theme registry by implementing ThemeRegistry
interface, and specifying the following configuration in metainfo/zk/zk.xml
or WEB-INF/zk.xml.
<desktop-config>
<theme-registry-class>foo.CustomThemeRegistry</theme-registry>
</desktop-config>
- Since:
- 6.5.2
- Author:
- neillee
-
Method Summary
Modifier and TypeMethodDescriptionbooleanderegister(Theme theme) Remove a theme from web application's useReturns the theme identified by themeNameTheme[]booleanDetermine if a theme is registeredbooleanRegister a theme, i.e. making the theme known to the web application Note: how to deal with duplicate registration is entirely up to the specific implementation of ThemeRegistry.
-
Method Details
-
register
Register a theme, i.e. making the theme known to the web application Note: how to deal with duplicate registration is entirely up to the specific implementation of ThemeRegistry.- Parameters:
theme- theme-specific information- Returns:
- true if the theme is registered; false if it cannot be registered
-
deregister
Remove a theme from web application's use- Parameters:
theme- the theme to be removed from the registry- Returns:
- true if the theme is removed; false if the theme cannot be found
- Since:
- 6.5.2
-
getThemes
Theme[] getThemes()- Returns:
- a list of currently registered themes
-
getTheme
Returns the theme identified by themeName- Parameters:
themeName- the name of the theme- Returns:
- the theme identified by themeName; null if the theme is not registered
-
hasTheme
Determine if a theme is registered- Parameters:
themeName- the name of the theme- Returns:
- true if a theme with themeName is registered; false if not
-