java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
- All Implemented Interfaces:
CSSValue,Serializable,Cloneable
- Direct Known Subclasses:
KeywordValue,PrimitiveValue,ValueList
Base implementation for CSS values.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this value.booleanabstract StringGet a string representation of the current value.getMinifiedCssText(String propertyName) Gives a minified version of the css text of the property.inthashCode()booleanIs this a subproperty that has been set by a shorthand?booleanIs this value a wildcard for a system-dependent default?matches(CSSValueSyntax syntax) Verify if this value matches the given grammar.voidsetCssText(String cssText) Attempts to change this value to match the supplied css text.toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssValueType, getMinifiedCssText, getPrecedingComments, getPrimitiveType, getTrailingComments, isPrimitiveValue, writeCssText
-
Constructor Details
-
StyleValue
protected StyleValue()
-
-
Method Details
-
setCssText
Attempts to change this value to match the supplied css text.In css4j, it is not recommended to set property values using this method.
- Specified by:
setCssTextin interfaceCSSValue- Parameters:
cssText- the text value.- Throws:
DOMException- SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is read-only.
-
getMinifiedCssText
Description copied from interface:CSSValueGives a minified version of the css text of the property.It may be customized for the given property name.
- Specified by:
getMinifiedCssTextin interfaceCSSValue- Parameters:
propertyName- the property name.- Returns:
- the minified css text.
-
isSubproperty
public boolean isSubproperty()Is this a subproperty that has been set by a shorthand?- Returns:
trueif this a subproperty that has been set by a shorthand,falseotherwise.
-
isSystemDefault
public boolean isSystemDefault()Is this value a wildcard for a system-dependent default?If that is the case, it cannot be used to compute values.
- Returns:
trueif this is a placeholder for a system-dependent default,falseotherwise.
-
matches
Verify if this value matches the given grammar. -
hashCode
public int hashCode() -
equals
-
toString
-
getCssText
Get a string representation of the current value.- Specified by:
getCssTextin interfaceCSSValue- Returns:
- the css text representing the value of this property.
-
clone
Description copied from interface:CSSValueCreates and returns a copy of this value.
-