org.zkoss.zul.theme
Class DesktopThemeRegistry

java.lang.Object
  extended by org.zkoss.zul.theme.DesktopThemeRegistry
All Implemented Interfaces:
org.zkoss.web.theme.ThemeRegistry

public class DesktopThemeRegistry
extends Object
implements org.zkoss.web.theme.ThemeRegistry

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
DesktopThemeRegistry()
          Initialize the registry with the default theme (a.k.a Breeze).
 
Method Summary
 boolean deregister(org.zkoss.web.theme.Theme theme)
          Remove a theme from the list of available desktop themes
 org.zkoss.web.theme.Theme getTheme(String themeName)
          Returns the desktop theme with the given name
 org.zkoss.web.theme.Theme[] getThemes()
          Returns a list of currently registered desktop themes
 boolean hasTheme(String themeName)
          Check if a dekstop theme with the given name is available to use
 boolean register(org.zkoss.web.theme.Theme theme)
          Register a desktop theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopThemeRegistry

public DesktopThemeRegistry()
Initialize the registry with the default theme (a.k.a Breeze).

Since:
6.5.2
Method Detail

register

public boolean register(org.zkoss.web.theme.Theme theme)
Register a desktop theme.

Specified by:
register in interface org.zkoss.web.theme.ThemeRegistry
Parameters:
theme - an instance of StandardTheme
Returns:
true if registration is successful; false if failed

deregister

public boolean deregister(org.zkoss.web.theme.Theme theme)
Remove a theme from the list of available desktop themes

Specified by:
deregister in interface org.zkoss.web.theme.ThemeRegistry
Parameters:
theme - the theme to be removed
Returns:
true if the theme is successfully removed; false if failed

getThemes

public org.zkoss.web.theme.Theme[] getThemes()
Returns a list of currently registered desktop themes

Specified by:
getThemes in interface org.zkoss.web.theme.ThemeRegistry
Returns:
the list of currently registered desktop themes

hasTheme

public boolean hasTheme(String themeName)
Check if a dekstop theme with the given name is available to use

Specified by:
hasTheme in interface org.zkoss.web.theme.ThemeRegistry
Returns:
true if theme is found; false otherwise

getTheme

public org.zkoss.web.theme.Theme getTheme(String themeName)
Returns the desktop theme with the given name

Specified by:
getTheme in interface org.zkoss.web.theme.ThemeRegistry
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


Copyright © 2013. All Rights Reserved.