com.steadystate.css.dom
Class CSSValueImpl
java.lang.Object
com.steadystate.css.dom.CSSOMObjectImpl
com.steadystate.css.dom.CSSValueImpl
- All Implemented Interfaces:
- CSSOMObject, Serializable, org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValue, org.w3c.dom.css.CSSValueList
public class CSSValueImpl
- extends CSSOMObjectImpl
- implements org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValueList
The 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 properties
- Author:
- David Schweinsberg, rbri
- See Also:
- Serialized Form
Fields inherited from interface org.w3c.dom.css.CSSPrimitiveValue |
CSS_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_URI |
Fields inherited from interface org.w3c.dom.css.CSSValue |
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST |
CSSValueImpl
public CSSValueImpl(org.w3c.css.sac.LexicalUnit value,
boolean forcePrimitive)
- Constructor
CSSValueImpl
public CSSValueImpl()
CSSValueImpl
public CSSValueImpl(org.w3c.css.sac.LexicalUnit value)
getValue
public Object getValue()
setValue
public void setValue(Object value)
getCssText
public String getCssText()
- Specified by:
getCssText
in interface org.w3c.dom.css.CSSValue
setCssText
public void setCssText(String cssText)
throws DOMException
- Specified by:
setCssText
in interface org.w3c.dom.css.CSSValue
- Throws:
DOMException
getCssValueType
public short getCssValueType()
- Specified by:
getCssValueType
in interface org.w3c.dom.css.CSSValue
getPrimitiveType
public short getPrimitiveType()
- Specified by:
getPrimitiveType
in interface org.w3c.dom.css.CSSPrimitiveValue
setFloatValue
public void setFloatValue(short unitType,
float floatValue)
throws DOMException
- Specified by:
setFloatValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getFloatValue
public float getFloatValue(short unitType)
throws DOMException
- Specified by:
getFloatValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
setStringValue
public void setStringValue(short stringType,
String stringValue)
throws DOMException
- Specified by:
setStringValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getStringValue
public String getStringValue()
throws DOMException
- TODO: return a value for a list type
- Specified by:
getStringValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getCounterValue
public org.w3c.dom.css.Counter getCounterValue()
throws DOMException
- Specified by:
getCounterValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getRectValue
public org.w3c.dom.css.Rect getRectValue()
throws DOMException
- Specified by:
getRectValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getRGBColorValue
public org.w3c.dom.css.RGBColor getRGBColorValue()
throws DOMException
- Specified by:
getRGBColorValue
in interface org.w3c.dom.css.CSSPrimitiveValue
- Throws:
DOMException
getLength
public int getLength()
- Specified by:
getLength
in interface org.w3c.dom.css.CSSValueList
item
public org.w3c.dom.css.CSSValue item(int index)
- Specified by:
item
in interface org.w3c.dom.css.CSSValueList
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class CSSOMObjectImpl
hashCode
public int hashCode()
- Overrides:
hashCode
in class CSSOMObjectImpl
Copyright © 2013. All rights reserved.