public class ThemeFns
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
applyCSS3(java.lang.String styleName,
java.lang.String styleValue)
Generates a specific browser CSS rule String for the given style name and
value.
|
static java.lang.String |
borderRadius(java.lang.String style)
Generates a specific browser CSS border-radius.
|
static java.lang.String |
box(java.lang.String styleName,
java.lang.String styleValue)
Generates a specific browser CSS rule string for box model.
|
static java.lang.String |
box2(java.lang.String styleName,
java.lang.String styleValue,
java.lang.String styleName2,
java.lang.String styleValue2)
Generates a specific browser CSS rule string for box model with two pair
styles.
|
static java.lang.String |
box3(java.lang.String styleName,
java.lang.String styleValue,
java.lang.String styleName2,
java.lang.String styleValue2,
java.lang.String styleName3,
java.lang.String styleValue3)
Generates a specific browser CSS rule string for box model with three pair
styles.
|
static java.lang.String |
boxShadow(java.lang.String style)
Generates a specific browser CSS box-shadow.
|
static java.lang.String |
getCurrentTheme()
Returns the current theme name
|
static ThemeRegistry |
getThemeRegistry()
Returns the current theme registry
|
static ThemeResolver |
getThemeResolver()
Returns the current theme resolver
|
static java.lang.String |
gradient(java.lang.String direction,
java.lang.String colors)
Generates a specific of browser CSS color gradient rules String.
|
static java.lang.String |
gradients(java.lang.String direction,
java.lang.String colors)
Generates a set of cross-browser CSS color gradient rules String.
|
static java.lang.String |
gradValue(java.lang.String direction,
java.lang.String colors)
Generates a specific CSS color gradient value only.
|
static void |
loadProperties(java.lang.String path)
Loads a theme properties and apply them into the request scope.
|
static void |
setThemeRegistry(ThemeRegistry themeRegistry)
Change the theme registry
|
static void |
setThemeResolver(ThemeResolver themeResolver)
Change the current theme resolver
|
static java.lang.String |
transform(java.lang.String style)
Generates a specific browser CSS transform.
|
public static java.lang.String gradient(java.lang.String direction, java.lang.String colors)
direction
- "ver", "hor", "diag-", "diag+", "rad"colors
- the colors with stops, which are separated by semicolon ";".
For example,
ThemeFns.gradient("ver", "#fefefe 0%; #eeeeee 100%");
public static java.lang.String gradValue(java.lang.String direction, java.lang.String colors)
direction
- "ver", "hor", "diag-", "diag+", "rad"colors
- the colors with stops, which are separated by semicolon ";"
For example,
ThemeFns.gradValue("ver", "#fefefe 0%; #eeeeee 100%");
public static java.lang.String gradients(java.lang.String direction, java.lang.String colors)
direction
- "ver", "hor", "diag-", "diag+", "rad"colors
- the colors, which are separated by semicolon ";"public static java.lang.String applyCSS3(java.lang.String styleName, java.lang.String styleValue)
Note: the method is only applied with the browser prefix as the style name, if the CSS3 style usage rule is different between browsers, please use another method instead.
styleName
- the value of the style name, like box-sizing
,
animation
styleValue
- the value according to the style name, like
border-box
, mymove 5s infinite
-moz-box-sizing
for firefox and
-webkit-box-sizing
for safari and chromepublic static java.lang.String box(java.lang.String styleName, java.lang.String styleValue)
styleName
- the value of the style name, like box-orient
,
box-pack
styleValue
- the value according to the style name, like
horizontal
, center
-moz-box-orient
for firefox and
-webkit-box-orient
for safari and chromepublic static java.lang.String box2(java.lang.String styleName, java.lang.String styleValue, java.lang.String styleName2, java.lang.String styleValue2)
box(String, String)
public static java.lang.String box3(java.lang.String styleName, java.lang.String styleValue, java.lang.String styleName2, java.lang.String styleValue2, java.lang.String styleName3, java.lang.String styleValue3)
public static java.lang.String transform(java.lang.String style)
style
- the value of the transformpublic static java.lang.String boxShadow(java.lang.String style)
style
- the value of the box-shadowpublic static java.lang.String borderRadius(java.lang.String style)
style
- the value of the border-radiuspublic static void loadProperties(java.lang.String path)
path
- a file pathpublic static ThemeRegistry getThemeRegistry()
public static void setThemeRegistry(ThemeRegistry themeRegistry)
themeRegistry
- the new theme registrypublic static ThemeResolver getThemeResolver()
public static void setThemeResolver(ThemeResolver themeResolver)
themeResolver
- the new theme resolverpublic static java.lang.String getCurrentTheme()
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.