- All Superinterfaces:
Cloneable
,CSSPrimitiveValue
,CSSTypedValue
,CSSValue
- All Known Implementing Classes:
NumberValue
,PercentageValue
A value that is a number with an optional unit.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Round this value to the nearest integer.void
setCalculatedNumber
(boolean calculated) Sets whether this number is the result of a calculation.Methods inherited from interface io.sf.carte.doc.style.css.CSSPrimitiveValue
getUnitType, isNegativeNumber, isPrimitiveValue, setExpectInteger
Methods inherited from interface io.sf.carte.doc.style.css.CSSTypedValue
clone, getFloatValue, getStringValue, isCalculatedNumber, isNumberZero, setFloatValue, setStringValue, toRGBColor, toRGBColorValue
Methods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getCssValueType, getMinifiedCssText, getMinifiedCssText, getPrimitiveType, matches, setCssText, writeCssText
-
Method Details
-
setCalculatedNumber
void setCalculatedNumber(boolean calculated) Sets whether this number is the result of a calculation.- Parameters:
calculated
-true
if this number was calculated.
-
roundToInteger
Round this value to the nearest integer.- Throws:
DOMException
- TYPE_MISMATCH_ERR if this value is not a plain<number>
.
-