public class CSSValueImpl extends CSSOMObjectImpl implements org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValueList, CSSFormatable
CSSValueImpl class can represent either a
CSSPrimitiveValue or a CSSValueList so that
the type can successfully change when using setCssText.
TODO:
Float unit conversions,
A means of checking valid primitive types for propertiesCSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URICSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST| Constructor and Description |
|---|
CSSValueImpl() |
CSSValueImpl(LexicalUnit value) |
CSSValueImpl(LexicalUnit value,
boolean forcePrimitive)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.w3c.dom.css.Counter |
getCounterValue() |
String |
getCssText() |
String |
getCssText(CSSFormat format)
Returns a string representation of the rule based on the given format.
|
short |
getCssValueType() |
float |
getFloatValue(short unitType) |
int |
getLength() |
short |
getPrimitiveType() |
org.w3c.dom.css.Rect |
getRectValue() |
org.w3c.dom.css.RGBColor |
getRGBColorValue() |
String |
getStringValue()
TODO: return a value for a list type
|
Object |
getValue() |
int |
hashCode() |
org.w3c.dom.css.CSSValue |
item(int index) |
void |
setCssText(String cssText) |
void |
setFloatValue(short unitType,
float floatValue) |
void |
setStringValue(short stringType,
String stringValue) |
void |
setValue(Object value) |
String |
toString() |
getUserData, getUserDataMap, setUserData, setUserDataMappublic CSSValueImpl(LexicalUnit value, boolean forcePrimitive)
public CSSValueImpl()
public CSSValueImpl(LexicalUnit value)
public Object getValue()
public void setValue(Object value)
public String getCssText()
getCssText in interface org.w3c.dom.css.CSSValuepublic String getCssText(CSSFormat format)
getCssText in interface CSSFormatableformat - the formatting rulespublic void setCssText(String cssText) throws DOMException
setCssText in interface org.w3c.dom.css.CSSValueDOMExceptionpublic short getCssValueType()
getCssValueType in interface org.w3c.dom.css.CSSValuepublic short getPrimitiveType()
getPrimitiveType in interface org.w3c.dom.css.CSSPrimitiveValuepublic void setFloatValue(short unitType,
float floatValue)
throws DOMException
setFloatValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic float getFloatValue(short unitType)
throws DOMException
getFloatValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic void setStringValue(short stringType,
String stringValue)
throws DOMException
setStringValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic String getStringValue() throws DOMException
getStringValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic org.w3c.dom.css.Counter getCounterValue() throws DOMException
getCounterValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic org.w3c.dom.css.Rect getRectValue() throws DOMException
getRectValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic org.w3c.dom.css.RGBColor getRGBColorValue() throws DOMException
getRGBColorValue in interface org.w3c.dom.css.CSSPrimitiveValueDOMExceptionpublic int getLength()
getLength in interface org.w3c.dom.css.CSSValueListpublic org.w3c.dom.css.CSSValue item(int index)
item in interface org.w3c.dom.css.CSSValueListpublic boolean equals(Object obj)
equals in class CSSOMObjectImplpublic int hashCode()
hashCode in class CSSOMObjectImplCopyright © 1999–2022. All rights reserved.