public class ResponsiveThemeRegistry extends DesktopThemeRegistry
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TABLET_PREFIX |
| Constructor and Description |
|---|
ResponsiveThemeRegistry()
Initialize the registry with a default tablet theme
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String TABLET_PREFIX
public ResponsiveThemeRegistry()
public boolean register(Theme theme)
register in interface ThemeRegistryregister in class 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(Theme theme)
Tablet themes must be identified with the "tablet:" prefix.
deregister in interface ThemeRegistryderegister in class 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 Theme[] getThemes()
getThemes in interface ThemeRegistrygetThemes in class DesktopThemeRegistrypublic boolean hasTheme(java.lang.String themeName)
hasTheme in interface ThemeRegistryhasTheme in class DesktopThemeRegistrythemeName - the name of the theme to checkpublic Theme getTheme(java.lang.String themeName)
getTheme in interface ThemeRegistrygetTheme in class DesktopThemeRegistrythemeName - the name of the theme to retrieveCopyright © 2005-2011 Potix Corporation. All Rights Reserved.