Class PercentageValue
java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.PrimitiveValue
io.sf.carte.doc.style.css.property.TypedValue
io.sf.carte.doc.style.css.property.NumberValue
io.sf.carte.doc.style.css.property.PercentageValue
- All Implemented Interfaces:
CSSPrimitiveValue
,CSSTypedValue
,CSSValue
,Serializable
,Cloneable
Percentage value.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type
-
Field Summary
Fields inherited from class io.sf.carte.doc.style.css.property.NumberValue
realvalue
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this object.float
getFloatValue
(short unitType) Gets a float value in a specified unit.Methods inherited from class io.sf.carte.doc.style.css.property.NumberValue
createCSSNumberValue, equals, floatValueConversion, getCssText, getDimensionUnitText, getMinifiedCssText, getUnitType, hashCode, isCalculatedNumber, isNegativeNumber, isNumberZero, minifyAbsolute, serializeAbsolute, setAbsolutizedUnit, setCssText, setExpectInteger, setFloatValue, setFloatValuePt, setIntegerValue, writeCssText
Methods inherited from class io.sf.carte.doc.style.css.property.TypedValue
getComponent, getCssValueType, getStringValue, setComponent, setStringValue, toRGBColor
Methods inherited from class io.sf.carte.doc.style.css.property.PrimitiveValue
getPrimitiveType, isPrimitiveValue, isSubproperty, setSubproperty
Methods inherited from class io.sf.carte.doc.style.css.property.StyleValue
isSystemDefault, matches, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.sf.carte.doc.style.css.CSSTypedValue
toRGBColorValue
Methods inherited from interface io.sf.carte.doc.style.css.CSSValue
getPrimitiveType, matches
-
Method Details
-
getFloatValue
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, aDOMException
is raised.- Specified by:
getFloatValue
in interfaceCSSTypedValue
- Overrides:
getFloatValue
in classNumberValue
- Parameters:
unitType
- A unit code to get the float value. The unit code can only beCSS_NUMBER
orCSS_PERCENTAGE
.- 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.
-
clone
Description copied from class:TypedValue
Creates and returns a copy of this object.The object will be the same except for the
subproperty
flag, that will be disabled in the clone object.- Specified by:
clone
in interfaceCSSValue
- Overrides:
clone
in classNumberValue
- Returns:
- a copy of this object.
-