public class CSSValueImpl extends AbstractLocatable implements org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValueList, Serializable
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(LexicalUnit value)
Ctor.
|
CSSValueImpl(LexicalUnit value,
boolean forcePrimitive)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.w3c.dom.css.Counter |
getCounterValue() |
String |
getCssText() |
short |
getCssValueType() |
float |
getFloatValue(short unitType) |
int |
getLength() |
short |
getPrimitiveType() |
org.w3c.dom.css.Rect |
getRectValue() |
org.w3c.dom.css.RGBColor |
getRGBColorValue() |
String |
getStringValue() |
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) |
String |
toString() |
getLocator, setLocatorpublic CSSValueImpl(LexicalUnit value, boolean forcePrimitive)
value - the lexical unit valueforcePrimitive - true or falsepublic CSSValueImpl(LexicalUnit value)
value - the valuepublic Object getValue()
public String getCssText()
getCssText in interface org.w3c.dom.css.CSSValuepublic 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.CSSValueListCopyright © 2018. All rights reserved.