|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidadinternal.style.util.CSSUtils
public class CSSUtils
CSS-related utilities. I think as we move away from xss, this code will be removed.
Constructor Summary | |
---|---|
CSSUtils()
|
Method Summary | |
---|---|
static java.lang.String |
getColorValue(java.awt.Color color)
Converts the specified Color to a valid CSS color value. |
static java.awt.Color |
parseColor(java.lang.String value)
Parses the CSS color value. |
static java.lang.String[] |
parseFontFamilies(java.lang.String value)
Parses a CSS font family value into a list of font family names. |
static java.lang.Integer |
parseFontSize(java.lang.String value)
Parses a CSS font size. |
static java.lang.Object |
parseFontStyle(java.lang.String value)
Parses a CSS font style |
static java.lang.Object |
parseFontWeight(java.lang.String value)
Parses a CS font weight |
static java.lang.Integer |
parseLength(java.lang.String value)
Parses a CSS length value. |
static CSSStyle |
parseStyle(java.lang.String text)
Parse an inline style into a CSSStyle object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSSUtils()
Method Detail |
---|
public static CSSStyle parseStyle(java.lang.String text)
public static java.awt.Color parseColor(java.lang.String value) throws PropertyParseException
value
- A CSS color value.
PropertyParseException
- Thrown if the specified color
value can not be parsed.public static java.lang.String[] parseFontFamilies(java.lang.String value) throws PropertyParseException
value
- A CSS font family value.
PropertyParseException
- Thrown if the specified font family
value can not be parsed.public static java.lang.Integer parseFontSize(java.lang.String value) throws PropertyParseException
value
- A CSS font size value. At the moment, all font
sizes must be specified in points (eg. "12pt").
PropertyParseException
- Thrown if the specified font size
value can not be parsed.public static java.lang.Object parseFontStyle(java.lang.String value) throws PropertyParseException
value
- A CSS font style value.
PropertyParseException
- Thrown if the specified font style
value can not be parsed.public static java.lang.Object parseFontWeight(java.lang.String value) throws PropertyParseException
value
- A CSS font weight value. At the moment, all font
weights must be specified as either "bold" or "normal".
PropertyParseException
- Thrown if the specified font weight
value can not be parsed.public static java.lang.Integer parseLength(java.lang.String value) throws PropertyParseException
value
- A CSS length value.
PropertyParseException
- Thrown if the specified
value can not be parsed.public static java.lang.String getColorValue(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |