public class ThemeFns extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
applyCSS3(String styleName,
String styleValue)
Generates a specific browser CSS rule String for the given style name and
value.
|
static String |
borderRadius(String style)
Generates a specific browser CSS border-radius.
|
static String |
box(String styleName,
String styleValue)
Generates a specific browser CSS rule string for box model.
|
static String |
box2(String styleName,
String styleValue,
String styleName2,
String styleValue2)
Generates a specific browser CSS rule string for box model with two pair
styles.
|
static String |
box3(String styleName,
String styleValue,
String styleName2,
String styleValue2,
String styleName3,
String styleValue3)
Generates a specific browser CSS rule string for box model with three pair
styles.
|
static String |
boxShadow(String style)
Generates a specific browser CSS box-shadow.
|
static String |
getCurrentTheme()
Returns the current theme name
|
static ThemeRegistry |
getThemeRegistry()
Returns the current theme registry
|
static ThemeResolver |
getThemeResolver()
Returns the current theme resolver
|
static String |
gradient(String direction,
String colors)
Generates a specific of browser CSS color gradient rules String.
|
static String |
gradients(String direction,
String colors)
Generates a set of cross-browser CSS color gradient rules String.
|
static String |
gradValue(String direction,
String colors)
Generates a specific CSS color gradient value only.
|
static void |
loadProperties(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 String |
transform(String style)
Generates a specific browser CSS transform.
|
public static String gradient(String direction, 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 String gradValue(String direction, 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 String gradients(String direction, String colors)
direction - "ver", "hor", "diag-", "diag+", "rad"colors - the colors, which are separated by semicolon ";"public static String applyCSS3(String styleName, 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,
animationstyleValue - 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 String box(String styleName, String styleValue)
styleName - the value of the style name, like box-orient,
box-packstyleValue - the value according to the style name, like
horizontal, center-moz-box-orient for firefox and
-webkit-box-orient for safari and chromepublic static String box2(String styleName, String styleValue, String styleName2, String styleValue2)
box(String, String)public static String box3(String styleName, String styleValue, String styleName2, String styleValue2, String styleName3, String styleValue3)
public static String transform(String style)
style - the value of the transformpublic static String boxShadow(String style)
style - the value of the box-shadowpublic static String borderRadius(String style)
style - the value of the border-radiuspublic static void loadProperties(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 String getCurrentTheme()
Copyright © 2021. All rights reserved.