info.informatica.doc.style.css.property
Class CSSNumberValue

java.lang.Object
  extended by info.informatica.doc.style.css.property.AbstractCSSValue
      extended by info.informatica.doc.style.css.property.AbstractCSSPrimitiveValue
          extended by info.informatica.doc.style.css.property.CSSNumberValue
All Implemented Interfaces:
StyleDatabaseAware, org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValue
Direct Known Subclasses:
CSSPercentageValue

public class CSSNumberValue
extends AbstractCSSPrimitiveValue

Float-specific CSSPrimitiveValue.


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
 
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
 
Method Summary
 String getCssText()
           
 float getFloatValue()
          Gets a float value in the device's natural unit, as defined by the style database.
 float getFloatValue(short unitType)
          Gets a float value in a specified unit.
 void setFloatValue(short unitType, float floatValue)
           
 
Methods inherited from class info.informatica.doc.style.css.property.AbstractCSSPrimitiveValue
getCounterValue, getLexicalUnit, getPrimitiveType, getRectValue, getRGBColorValue, getStringValue, getStyleDatabase, isSubproperty, nextPrimitiveValue, setStringValue, setStyleDatabase, setSubproperty
 
Methods inherited from class info.informatica.doc.style.css.property.AbstractCSSValue
createCSSValue, createCSSValue, getCssValueType, setCssText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.css.CSSValue
getCssValueType, setCssText
 

Method Detail

getCssText

public String getCssText()
Specified by:
getCssText in interface org.w3c.dom.css.CSSValue
Overrides:
getCssText in class AbstractCSSValue

setFloatValue

public void setFloatValue(short unitType,
                          float floatValue)
                   throws DOMException
Specified by:
setFloatValue in interface org.w3c.dom.css.CSSPrimitiveValue
Overrides:
setFloatValue in class AbstractCSSPrimitiveValue
Throws:
DOMException

getFloatValue

public float getFloatValue(short unitType)
                    throws DOMException
Gets a float value in a specified unit. If this CSS value doesn't contain a float value or can't be converted into the specified unit, a DOMException is raised.

Specified by:
getFloatValue in interface org.w3c.dom.css.CSSPrimitiveValue
Overrides:
getFloatValue in class AbstractCSSPrimitiveValue
Parameters:
unitType - A unit code to get the float value. The unit code can only be a float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).
Returns:
The float value in the specified unit.
Throws:
DOMException - INVALID_ACCESS_ERR if the CSS value can't be converted into the specified unit.

getFloatValue

public float getFloatValue()
                    throws DOMException
Gets a float value in the device's natural unit, as defined by the style database.

Returns:
the float value.
Throws:
DOMException - INVALID_ACCESS_ERR if the CSS value can't be converted into the natural unit.