java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
- All Implemented Interfaces:
ExtendedCSSValue
,Cloneable
,CSSValue
- Direct Known Subclasses:
InheritValue
,PrimitiveValue
,ValueList
Base implementation for CSS values.
-
Field Summary
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
-
Constructor Summary
ModifierConstructorDescriptionprotected
StyleValue
(short valueType) protected
StyleValue
(StyleValue copied) -
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.short
Gives a code defining the type of the value as defined byCSSValue
.getMinifiedCssText
(String propertyName) Gives a minified version of the css text of the property, for the given property name.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?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.ExtendedCSSValue
writeCssText
-
Constructor Details
-
StyleValue
protected StyleValue(short valueType) -
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
- 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.
-
getCssValueType
public short getCssValueType()Gives a code defining the type of the value as defined byCSSValue
.- Specified by:
getCssValueType
in interfaceCSSValue
- Returns:
- the value type according to CSS DOM Level 2.
-
getMinifiedCssText
Description copied from interface:ExtendedCSSValue
Gives a minified version of the css text of the property, for the given property name.- Specified by:
getMinifiedCssText
in interfaceExtendedCSSValue
- 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.
-
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:ExtendedCSSValue
Creates and returns a copy of this value.- Specified by:
clone
in interfaceExtendedCSSValue
- Overrides:
clone
in classObject
- Returns:
- a clone of this value.
-