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:
CSSNumberValue,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.floatgetFloatValue(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, getFloatValue, getMinifiedCssText, getUnitType, hashCode, isCalculatedNumber, isNegativeNumber, isNumberZero, minifyAbsolute, roundToInteger, serializeAbsolute, setAbsolutizedUnit, setCalculatedNumber, setCssText, setExpectInteger, setFloatValue, setFloatValuePt, setIntegerValue, setMaximumFractionDigits, writeCssTextMethods inherited from class io.sf.carte.doc.style.css.property.TypedValue
getComponent, getComponentCount, getCssValueType, setComponentMethods inherited from class io.sf.carte.doc.style.css.property.PrimitiveValue
getPrecedingComments, getPrimitiveType, getTrailingComments, isPrimitiveValue, isSubproperty, setSubpropertyMethods inherited from class io.sf.carte.doc.style.css.property.StyleValue
isSystemDefault, matches, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSPrimitiveValue
isPrimitiveValueMethods inherited from interface io.sf.carte.doc.style.css.CSSTypedValue
getStringValue, setStringValue, toRGBColor, toRGBColorValueMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssValueType, getMinifiedCssText, getPrecedingComments, getPrimitiveType, getTrailingComments, 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, aDOMExceptionis raised.- Specified by:
getFloatValuein interfaceCSSTypedValue- Overrides:
getFloatValuein classNumberValue- Parameters:
unitType- A unit code to get the float value. The unit code can only beCSS_NUMBERorCSS_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:TypedValueCreates and returns a copy of this object.The object will be the same except for the
subpropertyflag, that will be disabled in the clone object.- Specified by:
clonein interfaceCSSTypedValue- Specified by:
clonein interfaceCSSValue- Overrides:
clonein classNumberValue- Returns:
- a copy of this object.
-