|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zul.theme.DesktopThemeRegistry org.zkoss.zkmax.theme.ResponsiveThemeRegistry
public class ResponsiveThemeRegistry
A standard implementation of ThemeRegistry, used in ZK EE Used to keep track of a separate list of available tablet themes. Querying the registry for available themes will be responsive to the client's device. For example, mobile users will be replied a list of registered tablet themes, whereas desktop viewers will be given a list of registered desktop themes to choose from.
Field Summary | |
---|---|
static java.lang.String |
TABLET_PREFIX
|
Constructor Summary | |
---|---|
ResponsiveThemeRegistry()
Initialize the registry with a default tablet theme |
Method Summary | |
---|---|
boolean |
deregister(Theme theme)
Removes a desktop or a tablet theme from registry Tablet themes must be identified with the "tablet:" prefix. |
Theme |
getTheme(java.lang.String themeName)
Returns the registered device-specific theme; null if not found in registry |
Theme[] |
getThemes()
Returns the available themes, responsive to the users' device |
boolean |
hasTheme(java.lang.String themeName)
Checks if a certain theme is registered. |
boolean |
register(Theme theme)
Registers a desktop or a tablet theme Tablet themes must be identified with the "tablet:" prefix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TABLET_PREFIX
Constructor Detail |
---|
public ResponsiveThemeRegistry()
Method Detail |
---|
public boolean register(Theme theme)
register
in interface ThemeRegistry
register
in class DesktopThemeRegistry
theme
- the Theme to be registered. For tablet themes,
theme.getName() should have the prefix "tablet:". The tablet
theme would be registered with the prefix removed.
public boolean deregister(Theme theme)
Tablet themes must be identified with the "tablet:" prefix.
deregister
in interface ThemeRegistry
deregister
in class DesktopThemeRegistry
theme
- the theme to be removed. For tablet
themes, theme should have its name prepended with the prefix
"tablet:" before calling. For example, use the sequence below
to deregister a tablet theme.
Theme tabletTheme = new StandardTheme("tablet:dark");
themeRegistry.deregister(tabletTheme);
public Theme[] getThemes()
getThemes
in interface ThemeRegistry
getThemes
in class DesktopThemeRegistry
public boolean hasTheme(java.lang.String themeName)
hasTheme
in interface ThemeRegistry
hasTheme
in class DesktopThemeRegistry
themeName
- the name of the theme to check
public Theme getTheme(java.lang.String themeName)
getTheme
in interface ThemeRegistry
getTheme
in class DesktopThemeRegistry
themeName
- the name of the theme to retrieve
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |