public class SpreadsheetThemes extends Object
Constructor and Description |
---|
SpreadsheetThemes() |
Modifier and Type | Method and Description |
---|---|
static String |
getCurrentTheme()
Returns the current theme name
|
static String |
getDisplayName(String themeName)
Return the display name (human name) of the theme
|
static int |
getPriority(String themeName)
Return the priority of the given theme
|
static String |
getTheme(org.zkoss.zk.ui.Execution exe)
Returns the theme specified using the current theme resolution strategy
Default strategy is to use cookies
|
static String[] |
getThemes()
Returns an array of registered theme names
|
static boolean |
hasTheme(String themeName)
Returns true if the theme is registered
|
static void |
register(String themeName)
Register the theme, so it becomes available in the theme list
|
static void |
register(String themeName,
SpreadsheetStandardTheme.ThemeOrigin origin)
Register the theme, and specifies its origin (e.g.
|
static void |
register(String themeName,
String displayName,
int priority)
Register the theme with details
|
static void |
register(String themeName,
String displayName,
int priority,
SpreadsheetStandardTheme.ThemeOrigin origin)
Register the theme, its display name, its priority; and also specifies
its origin (e.g.
|
static String |
resolveThemeURL(String url) |
static void |
setDisplayName(String themeName,
String displayName)
Set the display name (human name) of the theme
|
static void |
setPriority(String themeName,
int priority)
Set the priority of the theme.
|
static void |
setTheme(org.zkoss.zk.ui.Execution exe,
String themeName)
Sets the theme name using the current theme resolution strategy
Default strategy is to use cookies
|
public static void setTheme(org.zkoss.zk.ui.Execution exe, String themeName)
exe
- ExecutionthemeName
- the new intended theme namepublic static String getTheme(org.zkoss.zk.ui.Execution exe)
exe
- Executionpublic static String getCurrentTheme()
public static boolean hasTheme(String themeName)
themeName
- the name of the themepublic static String[] getThemes()
public static void register(String themeName)
themeName
- the name of the theme to be registeredpublic static void register(String themeName, SpreadsheetStandardTheme.ThemeOrigin origin)
Themes.register("custom", Themes.ThemeOrigin.FOLDER)
to make your custom theme available if the theme resource is inside a folderthemeName
- theme nameorigin
- origin of the theme resourcepublic static void register(String themeName, String displayName, int priority)
themeName
- theme namedisplayName
- The human name of the themepriority
- Priority is higher if the value the smallerpublic static void register(String themeName, String displayName, int priority, SpreadsheetStandardTheme.ThemeOrigin origin)
Themes.register("custom", "Custom Theme", 100, Themes.ThemeOrigin.FOLDER)
to make your custom theme available if the theme resource is inside a folder.themeName
- theme namedisplayName
- a more descriptive name for the theme, for display purposepriority
- priority of the themeorigin
- origin of the theme resourcepublic static void setDisplayName(String themeName, String displayName)
themeName
- theme namedisplayName
- the new name to be displayedpublic static String getDisplayName(String themeName)
themeName
- theme namepublic static void setPriority(String themeName, int priority)
themeName
- theme namepriority
- Priority is higher if the value the smallerpublic static int getPriority(String themeName)
themeName
- theme nameCopyright © 2020. All rights reserved.