java.lang.Object
org.jhotdraw8.css.value.CssSize
- Direct Known Subclasses:
CssSizeWithUnits
Represents a size specified in a particular unit.
A CssSize can be used to hold the value of a CSS number-token,
percentage-token or dimension-token.
Unlike Size this class supports an open-ended
set of units.
References:
- CSS Syntax Module Level 3, Chapter 4. Tokenization
- w3.org
- Author:
- Werner Randelshofer
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabs()add(@NonNull CssSize that, @NonNull UnitConverter unitConverter) divide(double divisor) booleandoubledoublegetConvertedValue(@NonNull UnitConverter converter) doublegetConvertedValue(@NonNull UnitConverter converter, @NonNull String units) getUnits()doublegetValue()inthashCode()multiply(double factor) static CssSizeof(double value) static CssSizesubtract(@NonNull CssSize that, @NonNull UnitConverter unitConverter) toString()
-
Field Details
-
ZERO
-
ONE
-
-
Method Details
-
of
-
of
-
max
-
min
-
equals
-
getConvertedValue
public double getConvertedValue() -
getConvertedValue
-
getConvertedValue
-
getUnits
-
getValue
public double getValue() -
hashCode
public int hashCode() -
toString
-
subtract
-
add
-
subtract
-
add
-
abs
-
multiply
-
divide
-