org.zkoss.zkdemo.userguide
Class FontSizeThemeProvider

java.lang.Object
  extended by org.zkoss.zkdemo.userguide.FontSizeThemeProvider
All Implemented Interfaces:
ThemeProvider

public class FontSizeThemeProvider
extends java.lang.Object
implements ThemeProvider

Author:
Dennis.Chen / Jumper Chen

Constructor Summary
FontSizeThemeProvider()
           
 
Method Summary
static java.lang.String getFontSizeCookie(Execution exe)
          get font size value from cookie
static java.lang.String getSkinCookie(Execution exe)
          get skin value from cookie
 java.util.Collection getThemeURIs(Execution exe, java.util.List uris)
          Returns a list of the theme's URIs (Collection<String>) of the specified execution, or null if no theme shall be generated.
static void setFondSizeCookie(Execution exe, java.lang.String fontSize)
          set font size value to cookie
static void setSkinCookie(Execution exe, java.lang.String skin)
          set skin value to cookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontSizeThemeProvider

public FontSizeThemeProvider()
Method Detail

getThemeURIs

public java.util.Collection getThemeURIs(Execution exe,
                                         java.util.List uris)
Description copied from interface: ThemeProvider
Returns a list of the theme's URIs (Collection<String>) of the specified execution, or null if no theme shall be generated.

Specified by:
getThemeURIs in interface ThemeProvider
Parameters:
exe - the current execution (never null), where you can retrieve the current desktop, request and response. Note: if your Web application supports multiple devices, you have to check Desktop.getDevice().
uris - the default set of theme's URIs (List<String>), i.e., the themes defined in language definitions (lang.xml and lang-addon.xml) and the configuration (the theme-uri elements in web.xml). Each URI is a String instance.
Returns:
the collection of the theme's URIs (Collection<String>) that the current desktop shall use. Each URI is a String instance.

getFontSizeCookie

public static java.lang.String getFontSizeCookie(Execution exe)
get font size value from cookie

Parameters:
exe - Execution
Returns:
"lg" for larger font, "sm" for smaller font or "" for normal font.

setFondSizeCookie

public static void setFondSizeCookie(Execution exe,
                                     java.lang.String fontSize)
set font size value to cookie

Parameters:
exe - Execution
fontSize - "lg" for larger font, "sm" for smaller font or other string for normal font.

getSkinCookie

public static java.lang.String getSkinCookie(Execution exe)
get skin value from cookie


setSkinCookie

public static void setSkinCookie(Execution exe,
                                 java.lang.String skin)
set skin value to cookie



Copyright © 2005-2009 Potix Corporation. All Rights Reserved.