Package org.zkoss.zul.theme
Class StandardThemeProvider
java.lang.Object
org.zkoss.zul.theme.StandardThemeProvider
- All Implemented Interfaces:
org.zkoss.zk.ui.util.ThemeProvider
A standard implementation of ThemeProvider for ZK CE, which works with the
Marble theme (ZK 11.0 and later; formerly the Breeze series themes)
- Author:
- simonpai, jumperchen, neillee
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.zkoss.zk.ui.util.ThemeProvider
org.zkoss.zk.ui.util.ThemeProvider.Aide -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeforeWidgetCSS(org.zkoss.zk.ui.Execution exec, String uri) protected static StringgetThemeURIs(org.zkoss.zk.ui.Execution exec, List<Object> uris) Marble ships a reset stylesheet that must be loaded immediately before ZK's widget-CSS bundle (zk.wcs) so it keeps its "first" cascade position in the page.intgetWCSCacheControl(org.zkoss.zk.ui.Execution exec, String uri) protected static booleanReturns whether the current theme is the default theme (Marble), which ships its own reset stylesheet and no Font Awesome.
-
Field Details
-
DEFAULT_WCS
Default theme css file- See Also:
-
-
Constructor Details
-
StandardThemeProvider
public StandardThemeProvider()
-
-
Method Details
-
getThemeFileSuffix
-
isDefaultTheme
protected static boolean isDefaultTheme()Returns whether the current theme is the default theme (Marble), which ships its own reset stylesheet and no Font Awesome.- Since:
- 11.0.0
-
getThemeURIs
Marble ships a reset stylesheet that must be loaded immediately before ZK's widget-CSS bundle (zk.wcs) so it keeps its "first" cascade position in the page. For the default theme this method inserts the reset URI right before the first entry that starts withDEFAULT_WCS; for any other theme it only applies the theme suffix to that entry, since a legacy theme resets in its own norm.css.dsp.Which reset stylesheet is served is controlled by the library property
org.zkoss.zul.theme.browserDefault(boolean, defaultfalse):false(default) — serve the standard global reset (~./zul/css/reset.css), which overrides browser defaults page-wide.true— serve the host-safe reset (~./zul/css/reset-embed.css), scoped so it does not override a host page's own styles; use this when a ZK page is embedded inside another (non-ZK) page.
Since ZK 11.0.0 this method inserts the reset stylesheet for the default theme; earlier versions only applied the non-default-theme suffix to the widget-CSS bundle.
- Specified by:
getThemeURIsin interfaceorg.zkoss.zk.ui.util.ThemeProvider
-
getWCSCacheControl
- Specified by:
getWCSCacheControlin interfaceorg.zkoss.zk.ui.util.ThemeProvider
-
beforeWCS
- Specified by:
beforeWCSin interfaceorg.zkoss.zk.ui.util.ThemeProvider
-
beforeWidgetCSS
- Specified by:
beforeWidgetCSSin interfaceorg.zkoss.zk.ui.util.ThemeProvider
-