public class Theme
extends java.lang.Object
The themes are loaded from one or more property files and use a themeName:id identifier to build the key to reference the value in the property.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_THEME_NAME |
| Constructor and Description |
|---|
Theme(java.util.Map<java.lang.String,java.lang.Object> map)
Creates an instance of Theme with one or more themes
|
Theme(java.util.Properties properties)
Creates an instance of Theme with one or more themes
|
Theme(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map)
Creates an instance of Theme with one or more themes
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addCss(java.lang.String value,
java.lang.String css)
Adds additional content to a theme class="xxx" by prepending the new css
before the xxx.
|
java.lang.String |
addCssNoClass(java.lang.String value,
java.lang.String css)
Adds additional content to a theme class="xxx" by prepending the new css before the xxx.
|
void |
appendTheme(Theme theme) |
java.util.Map<java.lang.String,java.lang.Object> |
getMap() |
java.lang.String |
getName() |
Theme |
getTheme(java.lang.String themeName) |
java.util.Map<java.lang.String,Theme> |
getThemes() |
java.lang.String |
getValue(java.lang.String key) |
java.lang.String |
getValue(java.lang.String key,
java.lang.String css) |
void |
setMap(java.util.Map<java.lang.String,java.lang.Object> map) |
void |
setName(java.lang.String name) |
public static final java.lang.String DEFAULT_THEME_NAME
public Theme(java.util.Map<java.lang.String,java.lang.Object> map)
map - - map of key valuespublic Theme(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map)
name - - the name for the thememap - - map of key valuespublic Theme(java.util.Properties properties)
properties - - key valuespublic void appendTheme(Theme theme)
public java.util.Map<java.lang.String,Theme> getThemes()
public Theme getTheme(java.lang.String themeName)
public java.lang.String getValue(java.lang.String key)
public java.lang.String getValue(java.lang.String key,
java.lang.String css)
public java.lang.String addCss(java.lang.String value,
java.lang.String css)
value - the initial value returned from getThemecss - the additional css to prepend to the class info.public java.lang.String addCssNoClass(java.lang.String value,
java.lang.String css)
value - the initial value returned from getThemecss - the additional css to prepend to the class info.public java.util.Map<java.lang.String,java.lang.Object> getMap()
public void setMap(java.util.Map<java.lang.String,java.lang.Object> map)
public void setName(java.lang.String name)
public java.lang.String getName()