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
ConstructorsModifierConstructorDescriptionprotectedStyleValue(short valueType) protectedStyleValue(StyleValue copied) -
Method Summary
Modifier and TypeMethodDescriptionabstract StyleValueclone()Creates and returns a copy of this value.booleanabstract StringGet a string representation of the current value.shortGives 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.inthashCode()booleanIs this a subproperty that has been set by a shorthand?booleanIs this value a wildcard for a system-dependent default?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.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:
setCssTextin 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:
getCssValueTypein interfaceCSSValue- Returns:
- the value type according to CSS DOM Level 2.
-
getMinifiedCssText
Description copied from interface:ExtendedCSSValueGives a minified version of the css text of the property, for the given property name.- Specified by:
getMinifiedCssTextin 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:
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.
-
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:ExtendedCSSValueCreates and returns a copy of this value.- Specified by:
clonein interfaceExtendedCSSValue- Overrides:
clonein classObject- Returns:
- a clone of this value.
-