org.zkoss.web.theme
Interface ThemeRegistry

All Known Implementing Classes:
DesktopThemeRegistry, ResponsiveThemeRegistry

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. foo.CustomThemeRegistry

Since:
6.5.2
Author:
neillee

Method Summary
 boolean deregister(Theme theme)
          Remove a theme from web application's use
 Theme getTheme(java.lang.String themeName)
          Returns the theme identified by themeName
 Theme[] getThemes()
           
 boolean hasTheme(java.lang.String themeName)
          Determine if a theme is registered
 boolean register(Theme theme)
          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.
 

Method Detail

register

boolean register(Theme theme)
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

boolean deregister(Theme theme)
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

Theme getTheme(java.lang.String themeName)
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

boolean hasTheme(java.lang.String themeName)
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


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo