- All Superinterfaces:
Cloneable,CSSStyleValue,CSSVal,CSSValue,Serializable
- All Known Subinterfaces:
SVGValue,TypedValue
- All Known Implementing Classes:
AbstractStringValue,AbstractValue,AbstractValueList,CalcValue,ColorFunction,ColorValue,ComponentValue,ComputedValue,CSSOMComputedStyle.ComputedCSSValue,CSSOMStyleDeclaration.StyleDeclarationValue,CSSOMValue,FloatValue,IdentValue,InheritValue,LabColorValue,LCHColorValue,LexicalValue,ListValue,MathFunctionValue,NumericDelegateValue,NumericValue,PendingValue,RectValue,RevertValue,RGBColorValue,StringValue,SVGStylableElement.PresentationAttributeValue,UnsetValue,URIValue
This interface represents a property value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type -
Method Summary
Modifier and TypeMethodDescriptionclone()Create and return a copy of this object.If this value is a color value, get it.If this value is a counter() or counters() value, get it.default StringDeprecated.Get the modification handler.If this value is a rect() value, get it.default shortGets the css unit as in CSS4J'sCSSUnit.default booleanIs this value a component?default booleanisIdentifier(String internedIdent) Do this value represent the given identifier?default Valueitem(int index) If this value is a list, give the item corresponding to the requested index.iterator()If this value is a list, return an iterator.voidsetFloatValue(float value) If this value is a unit value, set the float value.voidSet the modification handler.Methods inherited from interface org.w3c.css.om.typed.CSSStyleValue
toStringMethods inherited from interface io.sf.carte.echosvg.css.engine.value.CSSVal
getFloatValue, getIdentifierValue, getLength, getStringValue, getURIValue, matches, writeCssTextMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getCssValueType, getMinifiedCssText, getMinifiedCssText, getPrecedingComments, getPrimitiveType, getTrailingComments, isPrimitiveValue, setCssText
-
Method Details
-
getUnitType
default short getUnitType()Gets the css unit as in CSS4J'sCSSUnit.If the value has no valid CSS unit, returns
CSSUnit.CSS_INVALID.- Returns:
- the css unit as in CSS4J's
CSSUnit.
-
setModificationHandler
Set the modification handler.- Parameters:
handler- the modification handler.
-
getModificationHandler
ValueModificationHandler getModificationHandler()Get the modification handler.- Returns:
- the modification handler, or
nullif there is no handler.
-
isComponent
default boolean isComponent()Is this value a component?- Returns:
trueif the value is a component.
-
isIdentifier
Do this value represent the given identifier?- Parameters:
internedIdent- the interned identifier string.- Returns:
trueif the value is a component.
-
getIdentifier
Deprecated.Convenience method that either returns an identifier or throws an exception.- Throws:
DOMException- INVALID_ACCESS_ERR: Raised if the value doesn't contain an identifier value.
-
setFloatValue
If this value is a unit value, set the float value.- Parameters:
value- the new value, in the current unit.- Throws:
DOMException- if the value is not a unit value.
-
item
If this value is a list, give the item corresponding to the requested index. If there is no item at such index, returnnullIf this object is not a list and the index is0, return itself. -
iterator
If this value is a list, return an iterator.- Returns:
- the iterator.
- Throws:
UnsupportedOperationException- if this value is not a list.
-
getCounterValue
If this value is a counter() or counters() value, get it.- Returns:
- the counter() value.
- Throws:
DOMException- INVALID_ACCESS_ERR if this is not a counter() or counters() value.
-
getRectValue
If this value is a rect() value, get it.- Returns:
- the rect() value.
- Throws:
DOMException- INVALID_ACCESS_ERR if this is not a rect() value.
-
getColorValue
If this value is a color value, get it.- Returns:
- the color value.
- Throws:
DOMException- INVALID_ACCESS_ERR if this is not a color value.
-
clone
Value clone()Create and return a copy of this object.If this object is unmodifiable, the clone will be modifiable.
-