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
-
Method Summary
Modifier and TypeMethodDescriptionabstract StyleValue
clone()
Creates and returns a copy of this value.boolean
abstract String
Get a string representation of the current value.getMinifiedCssText
(String propertyName) Gives a minified version of the css text of the property.int
hashCode()
boolean
Is this a subproperty that has been set by a shorthand?boolean
Is this value a wildcard for a system-dependent default?matches
(CSSValueSyntax syntax) Verify if this value matches the given grammar.void
setCssText
(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, wait
Methods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssValueType, getMinifiedCssText, getPrimitiveType, 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:
setCssText
in 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:CSSValue
Gives a minified version of the css text of the property.It may be customized for the given property name.
- Specified by:
getMinifiedCssText
in 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:
true
if this a subproperty that has been set by a shorthand,false
otherwise.
-
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:
true
if this is a placeholder for a system-dependent default,false
otherwise.
-
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:
getCssText
in interfaceCSSValue
- Returns:
- the css text representing the value of this property.
-
clone
Description copied from interface:CSSValue
Creates and returns a copy of this value.
-