public final class ThemeManager extends Object
| Constructor and Description |
|---|
ThemeManager(DomApplication application) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCurrentTheme()
Gets the current theme string.
|
ITheme |
getTheme(String themeName,
IResourceDependencyList rdl)
Get the theme store representing the specified theme name.
|
String |
getThemedResourceRURL(IThemeVariant themeStyle,
String path)
This checks to see if the RURL passed is a theme-relative URL.
|
IThemeFactory |
getThemeFactory()
Get the current theme factory.
|
IScriptScope |
getThemeMap(String themeName,
IResourceDependencyList rdlin)
Return the current theme map (a readonly map), cached from the last
time.
|
String |
getThemeReplacedString(IResourceDependencyList rdl,
String rurl) |
String |
getThemeReplacedString(IResourceDependencyList rdl,
String rurl,
BrowserVersion bv)
EXPENSIVE CALL - ONLY USE TO CREATE CACHED RESOURCES
This loads a theme resource as an utf-8 encoded template, then does expansion using the
current theme's variable map.
|
void |
setCurrentTheme(String currentTheme)
Sets the current theme string.
|
void |
setThemeFactory(IThemeFactory themer)
Set the factory for handling the theme.
|
public ThemeManager(DomApplication application)
public void setCurrentTheme(@Nonnull String currentTheme)
currentTheme - The theme name, valid for the current theme engine. Cannot be null nor the empty string.@Nonnull public String getCurrentTheme()
@Nonnull public IThemeFactory getThemeFactory()
public void setThemeFactory(@Nonnull IThemeFactory themer)
themer - @Nonnull public ITheme getTheme(String themeName, @Nullable IResourceDependencyList rdl)
rdl - Exceptionpublic String getThemeReplacedString(@Nonnull IResourceDependencyList rdl, String rurl) throws Exception
Exceptionpublic String getThemeReplacedString(@Nonnull IResourceDependencyList rdl, @Nonnull String rurl, @Nullable BrowserVersion bv) throws Exception
rdl - Exceptionpublic IScriptScope getThemeMap(String themeName, IResourceDependencyList rdlin) throws Exception
rdl - Exception@Nonnull public String getThemedResourceRURL(@Nonnull IThemeVariant themeStyle, @Nonnull String path)
$THEME/[currentThemeString]/[name]
where [name] is the rest of the path string after THEME/ has been removed from it.themeStyle - The substyle/variant of the theme that the page wants to use.path - Copyright © 2017 etc.to. All rights reserved.