org.zkoss.zkmax.theme
Class StandardThemeProvider
java.lang.Object
org.zkoss.zul.theme.StandardThemeProvider
org.zkoss.zkex.theme.StandardThemeProvider
org.zkoss.zkmax.theme.StandardThemeProvider
- All Implemented Interfaces:
- ThemeProvider
public class StandardThemeProvider
- extends StandardThemeProvider
A standard implementation of ThemeProvider for ZK EE, which works with the
Breeze series themes, and also supports standard-derived tablet themes
- Since:
- 6.5.2
- Author:
- Neil
Field Summary |
static java.lang.String |
DEFAULT_TABLET_CSS
Default tablet-enhanced theme css file (ZK EE only) |
static java.lang.String |
TABLET_THEME_DISABLED_KEY
Deprecated. since 6.5.2, customizing tablet theme no longer requires this library property |
Method Summary |
java.lang.String |
beforeWidgetCSS(Execution exec,
java.lang.String uri)
Called when a WCS (Widget CSS descriptor) file is about to load the CSS file associated
with a widget. |
java.util.Collection<java.lang.Object> |
getThemeURIs(Execution exec,
java.util.List<java.lang.Object> uris)
Returns a list of the theme's URIs of the specified execution,
or null if no theme shall be generated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TABLET_THEME_DISABLED_KEY
public static final java.lang.String TABLET_THEME_DISABLED_KEY
- Deprecated. since 6.5.2, customizing tablet theme no longer requires this library property
- Use this library property to disable tablet-enhanced theme (ZK EE only)
- See Also:
- Constant Field Values
DEFAULT_TABLET_CSS
public static final java.lang.String DEFAULT_TABLET_CSS
- Default tablet-enhanced theme css file (ZK EE only)
- See Also:
- Constant Field Values
StandardThemeProvider
public StandardThemeProvider()
getThemeURIs
public java.util.Collection<java.lang.Object> getThemeURIs(Execution exec,
java.util.List<java.lang.Object> uris)
- Description copied from interface:
ThemeProvider
- Returns a list of the theme's URIs of the specified execution,
or null if no theme shall be generated.
Each item could be an instance of either
String
or StyleSheet
.
If you want to specify the media
attribute, use StyleSheet
.
It is called when a desktop is about to be rendered.
It is called only once for each desktop.
Notice that StyleSheet
is allowed since 5.0.3.
- Specified by:
getThemeURIs
in interface ThemeProvider
- Overrides:
getThemeURIs
in class StandardThemeProvider
- Parameters:
exec
- the current execution (never null), where you can retrieve
the 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,
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 an instance of of either String
or StyleSheet
.
Notice that, unless it is customized by application specific lang-addon,
all URIs are, by default, String instances.
- Returns:
- the collection of the theme's URIs
that the current desktop shall use.
Each URI is an instance of of either
String
or StyleSheet
.
beforeWidgetCSS
public java.lang.String beforeWidgetCSS(Execution exec,
java.lang.String uri)
- Description copied from interface:
ThemeProvider
- Called when a WCS (Widget CSS descriptor) file is about to load the CSS file associated
with a widget.
This method then returns the real URI of the WCS file to load.
If no need to change, just return the
uri
parameter.
This method is usually overridden to load the CSS files from
a different directory. For example,
String beforeWidgetCSS(Execution exec, String uri) {
return uri.startsWith("~./") ? "~./foo/" + uri.substring(3): uri;
}
- Specified by:
beforeWidgetCSS
in interface ThemeProvider
- Overrides:
beforeWidgetCSS
in class StandardThemeProvider
- Parameters:
exec
- the current execution (never null), where you can retrieve
the request ad response. However, unlike
ThemeProvider.getThemeURIs(org.zkoss.zk.ui.Execution, java.util.List)
, the desktop might not be available when this
method is called.uri
- the URI of the CSS file associated with a widget, e.g.,
~./js/zul/wgt/css/a.css.dsp
- Returns:
- the real URI of the CSS file to load
If null is returned, the CSS file is ignored.
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.