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
TheCSSValueImplclass can represent either aCSSPrimitiveValueor aCSSValueListso 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.CountergetCounterValue()java.lang.StringgetCssText()shortgetCssValueType()floatgetFloatValue(short unitType)intgetLength()shortgetPrimitiveType()org.w3c.dom.css.RectgetRectValue()org.w3c.dom.css.RGBColorgetRGBColorValue()java.lang.StringgetStringValue()TODO: return a value for a list typejava.lang.ObjectgetValue()org.w3c.dom.css.CSSValueitem(int index)voidsetCssText(java.lang.String cssText)voidsetFloatValue(short unitType, float floatValue)voidsetStringValue(short stringType, java.lang.String stringValue)voidsetValue(java.lang.Object value)java.lang.StringtoString()-
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:
getCssTextin interfaceorg.w3c.dom.css.CSSValue
-
setCssText
public void setCssText(java.lang.String cssText) throws org.w3c.dom.DOMException- Specified by:
setCssTextin interfaceorg.w3c.dom.css.CSSValue- Throws:
org.w3c.dom.DOMException
-
getCssValueType
public short getCssValueType()
- Specified by:
getCssValueTypein interfaceorg.w3c.dom.css.CSSValue
-
getPrimitiveType
public short getPrimitiveType()
- Specified by:
getPrimitiveTypein interfaceorg.w3c.dom.css.CSSPrimitiveValue
-
setFloatValue
public void setFloatValue(short unitType, float floatValue) throws org.w3c.dom.DOMException- Specified by:
setFloatValuein interfaceorg.w3c.dom.css.CSSPrimitiveValue- Throws:
org.w3c.dom.DOMException
-
getFloatValue
public float getFloatValue(short unitType) throws org.w3c.dom.DOMException- Specified by:
getFloatValuein 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:
setStringValuein interfaceorg.w3c.dom.css.CSSPrimitiveValue- Throws:
org.w3c.dom.DOMException
-
getStringValue
public java.lang.String getStringValue() throws org.w3c.dom.DOMExceptionTODO: return a value for a list type- Specified by:
getStringValuein 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:
getCounterValuein 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:
getRectValuein 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:
getRGBColorValuein interfaceorg.w3c.dom.css.CSSPrimitiveValue- Throws:
org.w3c.dom.DOMException
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceorg.w3c.dom.css.CSSValueList
-
item
public org.w3c.dom.css.CSSValue item(int index)
- Specified by:
itemin interfaceorg.w3c.dom.css.CSSValueList
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-