Package io.sf.carte.doc.style.css
Interface CSSValue
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
CSSAttrValue
,CSSColorValue
,CSSCountersValue
,CSSCounterValue
,CSSEnvVariableValue
,CSSExpressionValue
,CSSFunctionValue
,CSSGradientValue
,CSSLexicalValue
,CSSPrimitiveValue
,CSSRatioValue
,CSSShorthandValue
,CSSTypedValue
,CSSUnicodeRangeValue
,CSSUnicodeRangeValue.CSSUnicodeValue
,CSSValueList<E>
,CSSVarValue
,HSLColorValue
,HWBColorValue
,LABColorValue
,LCHColorValue
,RGBColorValue
- All Known Implementing Classes:
AttrValue
,CalcValue
,ColorValue
,EnvVariableValue
,ExpressionValue
,FunctionValue
,GradientValue
,HSLColorValue
,HWBColorValue
,IdentifierValue
,InheritValue
,InitialValue
,KeywordValue
,LABColorValue
,LCHColorValue
,LexicalValue
,LinkedCSSValueList
,NumberValue
,PercentageValue
,PrimitiveValue
,ProxyValue
,RatioValue
,RectValue
,RevertValue
,RGBColorValue
,StringValue
,StyleValue
,SystemDefaultValue
,TypedValue
,UnicodeRangeValue
,UnicodeValue
,UnicodeWildcardValue
,UnknownValue
,UnsetValue
,URIValue
,URIValueWrapper
,ValueList
,VarValue
A CSS style value.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The main categories of values.static enum
The type of value. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this value.Get a parsable representation of this value.Get the general category to which this value belongs.getMinifiedCssText
(String propertyName) Gives a minified version of the css text of the property.Get the primitive type.matches
(CSSValueSyntax syntax) Verify if this value matches the given grammar.void
setCssText
(String cssText) Set this value according to the given parsable text.void
writeCssText
(io.sf.carte.util.SimpleWriter wri) Serialize this value to aSimpleWriter
.
-
Method Details
-
getCssValueType
CSSValue.CssType getCssValueType()Get the general category to which this value belongs.- Returns:
- the general value type.
-
getPrimitiveType
CSSValue.Type getPrimitiveType()Get the primitive type.- Returns:
- the primitive type.
-
getCssText
String getCssText()Get a parsable representation of this value.- Returns:
- the CSS serialization of this value.
-
setCssText
Set this value according to the given parsable text.- Parameters:
cssText
- the text value.- Throws:
DOMException
- INVALID_MODIFICATION_ERR if the text value represents a different type or the value cannot be modified.
INVALID_CHARACTER_ERR if an invalid character was found.
SYNTAX_ERR if the string is invalid CSS.
-
clone
CSSValue clone()Creates and returns a copy of this value.- Returns:
- a clone of this value.
-
getMinifiedCssText
Gives a minified version of the css text of the property.It may be customized for the given property name.
- Parameters:
propertyName
- the property name.- Returns:
- the minified css text.
-
writeCssText
Serialize this value to aSimpleWriter
.- Parameters:
wri
- the SimpleWriter.- Throws:
IOException
- if an error happened while writing.
-
matches
Verify if this value matches the given grammar.See also:
SyntaxParser
.- Parameters:
syntax
- the syntax.- Returns:
- the matching for the syntax.
-