-
Enhancement
-
Resolution: Withdrawn
-
P4
-
None
Size and SizeUnit are used for CSS numeric data types (http://www.w3.org/TR/css3-values/#numeric-types), CSS percentage values (http://www.w3.org/TR/css3-values/#percentages), CSS lengths (http://www.w3.org/TR/css3-values/#lengths) and CSS angles (http://www.w3.org/TR/css3-values/#angles). These currently live in the com.sun.javafx.css package. These classes need to be moved to javafx.css in order to remove raw types from generics in the CSS public API. Some methods in the com.sun.javafx.css API should be renamed to make their purpose clearer.
Size:
public double getValue() - return the number part of the css value
public SizeUnits getUnits() - return the units, e.g. - em, px, %
public double computeValue(Font font) - convert the value from its units to pixels, percents, or degrees using the size of the given font if the units are font-relative or percentage
enum SizeUnits
public boolean isFontRelative() - return true if the units are font-relative (em or ex)
SizeUnits enums are: PERCENT, CM, IN, MM, PC, PT, PX, EM, EX, DEG, GRAD, RAD, TURN
Size:
public double getValue() - return the number part of the css value
public SizeUnits getUnits() - return the units, e.g. - em, px, %
public double computeValue(Font font) - convert the value from its units to pixels, percents, or degrees using the size of the given font if the units are font-relative or percentage
enum SizeUnits
public boolean isFontRelative() - return true if the units are font-relative (em or ex)
SizeUnits enums are: PERCENT, CM, IN, MM, PC, PT, PX, EM, EX, DEG, GRAD, RAD, TURN