Package com.steadystate.css.dom
Class CSSValueImpl
- java.lang.Object
-
- com.steadystate.css.dom.CSSOMObjectImpl
-
- com.steadystate.css.dom.CSSValueImpl
-
- All Implemented Interfaces:
CSSOMObject
,java.io.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, java.io.Serializable
TheCSSValueImpl
class can represent either aCSSPrimitiveValue
or aCSSValueList
so that the type can successfully change when usingsetCssText
. TODO: Float unit conversions, A means of checking valid primitive types for properties- Version:
- $Id: CSSValueImpl.java,v 1.3 2008/03/26 02:08:55 sdanig Exp $
- Author:
- David Schweinsberg
- See Also:
- Serialized Form
-
-
Field Summary
-
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
-
-
Constructor Summary
Constructors Constructor Description CSSValueImpl()
CSSValueImpl(org.w3c.css.sac.LexicalUnit value)
CSSValueImpl(org.w3c.css.sac.LexicalUnit value, boolean forcePrimitive)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.css.Counter
getCounterValue()
java.lang.String
getCssText()
short
getCssValueType()
float
getFloatValue(short unitType)
int
getLength()
short
getPrimitiveType()
org.w3c.dom.css.Rect
getRectValue()
org.w3c.dom.css.RGBColor
getRGBColorValue()
java.lang.String
getStringValue()
TODO: return a value for a list typejava.lang.Object
getValue()
org.w3c.dom.css.CSSValue
item(int index)
void
setCssText(java.lang.String cssText)
void
setFloatValue(short unitType, float floatValue)
void
setStringValue(short stringType, java.lang.String stringValue)
void
setValue(java.lang.Object value)
java.lang.String
toString()
-
Methods inherited from class com.steadystate.css.dom.CSSOMObjectImpl
getUserData, getUserDataMap, setUserData, setUserDataMap
-
-
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
-
setValue
public void setValue(java.lang.Object value)
-
getCssText
public java.lang.String getCssText()
- Specified by:
getCssText
in interfaceorg.w3c.dom.css.CSSValue
-
setCssText
public void setCssText(java.lang.String cssText) throws org.w3c.dom.DOMException
- Specified by:
setCssText
in interfaceorg.w3c.dom.css.CSSValue
- Throws:
org.w3c.dom.DOMException
-
getCssValueType
public short getCssValueType()
- Specified by:
getCssValueType
in interfaceorg.w3c.dom.css.CSSValue
-
getPrimitiveType
public short getPrimitiveType()
- Specified by:
getPrimitiveType
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
-
setFloatValue
public void setFloatValue(short unitType, float floatValue) throws org.w3c.dom.DOMException
- Specified by:
setFloatValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getFloatValue
public float getFloatValue(short unitType) throws org.w3c.dom.DOMException
- Specified by:
getFloatValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
setStringValue
public void setStringValue(short stringType, java.lang.String stringValue) throws org.w3c.dom.DOMException
- Specified by:
setStringValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getStringValue
public java.lang.String getStringValue() throws org.w3c.dom.DOMException
TODO: return a value for a list type- Specified by:
getStringValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getCounterValue
public org.w3c.dom.css.Counter getCounterValue() throws org.w3c.dom.DOMException
- Specified by:
getCounterValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getRectValue
public org.w3c.dom.css.Rect getRectValue() throws org.w3c.dom.DOMException
- Specified by:
getRectValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getRGBColorValue
public org.w3c.dom.css.RGBColor getRGBColorValue() throws org.w3c.dom.DOMException
- Specified by:
getRGBColorValue
in interfaceorg.w3c.dom.css.CSSPrimitiveValue
- Throws:
org.w3c.dom.DOMException
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceorg.w3c.dom.css.CSSValueList
-
item
public org.w3c.dom.css.CSSValue item(int index)
- Specified by:
item
in interfaceorg.w3c.dom.css.CSSValueList
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-