public class ResponsiveThemeRegistry
extends org.zkoss.zul.theme.DesktopThemeRegistry
| Modifier and Type | Field and Description |
|---|---|
static String |
TABLET_PREFIX |
| Constructor and Description |
|---|
ResponsiveThemeRegistry()
Initialize the registry with a default tablet theme
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
deregister(org.zkoss.web.theme.Theme theme)
Removes a desktop or a tablet theme from registry
Tablet themes must be identified with the "tablet:" prefix.
|
org.zkoss.web.theme.Theme |
getTheme(String themeName)
Returns the registered device-specific theme; null if not found in registry
|
org.zkoss.web.theme.Theme[] |
getThemes()
Returns the available themes, responsive to the users' device
|
boolean |
hasTheme(String themeName)
Checks if a certain theme is registered.
|
boolean |
register(org.zkoss.web.theme.Theme theme)
Registers a desktop or a tablet theme
Tablet themes must be identified with the "tablet:" prefix.
|
public static final String TABLET_PREFIX
public ResponsiveThemeRegistry()
public boolean register(org.zkoss.web.theme.Theme theme)
register in interface org.zkoss.web.theme.ThemeRegistryregister in class org.zkoss.zul.theme.DesktopThemeRegistrytheme - 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(org.zkoss.web.theme.Theme theme)
Tablet themes must be identified with the "tablet:" prefix.
deregister in interface org.zkoss.web.theme.ThemeRegistryderegister in class org.zkoss.zul.theme.DesktopThemeRegistrytheme - 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 org.zkoss.web.theme.Theme[] getThemes()
getThemes in interface org.zkoss.web.theme.ThemeRegistrygetThemes in class org.zkoss.zul.theme.DesktopThemeRegistrypublic boolean hasTheme(String themeName)
hasTheme in interface org.zkoss.web.theme.ThemeRegistryhasTheme in class org.zkoss.zul.theme.DesktopThemeRegistrythemeName - the name of the theme to checkpublic org.zkoss.web.theme.Theme getTheme(String themeName)
getTheme in interface org.zkoss.web.theme.ThemeRegistrygetTheme in class org.zkoss.zul.theme.DesktopThemeRegistrythemeName - the name of the theme to retrieveCopyright © 2026. All rights reserved.