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

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
              extended by info.informatica.doc.style.css.property.CSSPercentageValue
All Implemented Interfaces:
StyleDatabaseAware, org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValue

public class CSSPercentageValue
extends CSSNumberValue

Percentage CSSPrimitiveValue.

Author:
Carlos Amengual (amengual at informatica.info)

Field Summary
 
Fields inherited from class info.informatica.doc.style.css.property.CSSNumberValue
realvalue
 
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
 float getFloatValue(short unitType)
          Gets a float value in a specified unit.
 
Methods inherited from class info.informatica.doc.style.css.property.CSSNumberValue
getCssText, getFloatValue, setFloatValue
 
Methods inherited from class info.informatica.doc.style.css.property.AbstractCSSPrimitiveValue
domPrimitiveType, getCounterValue, getLexicalUnit, getPrimitiveType, getRectValue, getRGBColorValue, getStringValue, getStyleDatabase, isSubproperty, nextPrimitiveValue, setCSSUnitType, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.css.CSSValue
getCssValueType, setCssText
 

Method Detail

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 CSSNumberValue
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 doesn't contain a float value or if the float value can't be converted into the specified unit.


Copyright © 2011 informatica.info. All Rights Reserved.