org.zkoss.zkplus.theme
Class Themes

java.lang.Object
  extended by org.zkoss.zkplus.theme.Themes

public class Themes
extends java.lang.Object

Utilities for managing standard theme.

Author:
sam

Field Summary
static java.lang.String BREEZE_DISPLAY
           
static java.lang.String BREEZE_NAME
           
static int BREEZE_PRIORITY
           
 
Constructor Summary
Themes()
           
 
Method Summary
static java.lang.String getCurrentTheme()
          Returns the current theme name
static java.lang.String getDisplayName(java.lang.String theme)
          Return the display name (human name) of the theme
static int getPriority(java.lang.String theme)
          Return the priority of the given theme
static java.lang.String getTheme(Execution exe)
          Returns the theme specified in cookies
static java.lang.String[] getThemes()
          Return an array of all registered theme names
static boolean hasTheme(java.lang.String theme)
          Returns true if the theme is registered
static void register(java.lang.String theme)
          Register the theme, so it becomes available in the theme list
static void register(java.lang.String theme, java.lang.String displayName, int priority)
          Register the theme with details
static void setDisplayName(java.lang.String theme, java.lang.String name)
          Set the display name (human name) of the theme
static void setPriority(java.lang.String theme, int priority)
          Set the priority of the theme.
static void setTheme(Execution exe, java.lang.String theme)
          Sets the theme name in cookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BREEZE_NAME

public static final java.lang.String BREEZE_NAME
See Also:
Constant Field Values

BREEZE_DISPLAY

public static final java.lang.String BREEZE_DISPLAY
See Also:
Constant Field Values

BREEZE_PRIORITY

public static final int BREEZE_PRIORITY
See Also:
Constant Field Values
Constructor Detail

Themes

public Themes()
Method Detail

setTheme

public static void setTheme(Execution exe,
                            java.lang.String theme)
Sets the theme name in cookie


getTheme

public static java.lang.String getTheme(Execution exe)
Returns the theme specified in cookies

Parameters:
exe - Execution
Returns:
the name of the theme or "" for default theme.

getCurrentTheme

public static java.lang.String getCurrentTheme()
Returns the current theme name


hasTheme

public static boolean hasTheme(java.lang.String theme)
Returns true if the theme is registered


getThemes

public static java.lang.String[] getThemes()
Return an array of all registered theme names


register

public static void register(java.lang.String theme)
Register the theme, so it becomes available in the theme list


register

public static void register(java.lang.String theme,
                            java.lang.String displayName,
                            int priority)
Register the theme with details

Parameters:
displayName - The human name of the theme
priority - Priority is higher if the value the smaller

setDisplayName

public static void setDisplayName(java.lang.String theme,
                                  java.lang.String name)
Set the display name (human name) of the theme


getDisplayName

public static java.lang.String getDisplayName(java.lang.String theme)
Return the display name (human name) of the theme


setPriority

public static void setPriority(java.lang.String theme,
                               int priority)
Set the priority of the theme.

Parameters:
priority - Priority is higher if the value the smaller

getPriority

public static int getPriority(java.lang.String theme)
Return the priority of the given theme



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