Enum Class SizeUnits
- All Implemented Interfaces:
- Serializable,- Comparable<SizeUnits>,- Constable
Represents a size specified in a particular unit, such as 14px or 0.2em.
- Since:
- 9
- 
Nested Class SummaryNested classes/interfaces declared in class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionRepresents a size in centimeters.Represents an angle in degrees.Represents a size in EM unit.Represents a size in EX unit.Represents an angle in gradians.Represents a size in inches.Represents a size in millimeters.Represents time in milliseconds.Represents a size in picas.Represents a size as a percentage.Represents a size in points.Represents a size in pixels.Represents an angle in radians.Represents time in seconds.Represents an angle in turns.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanGets wehther thisSizeUnitsvalue is absolute.abstract doubleCalculates pixels for a particularSizeUnits.abstract doubleCalculates points for a particularSizeUnits.static SizeUnitsReturns the enum constant of this class with the specified name.static SizeUnits[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
PERCENTRepresents a size as a percentage.
- 
INRepresents a size in inches.
- 
CMRepresents a size in centimeters.
- 
MMRepresents a size in millimeters.
- 
EMRepresents a size in EM unit. Note: It is a unit relative to the font-size of the element.
- 
EXRepresents a size in EX unit. Note: In the absence of font metrics, oneEXis taken to be half anEMunit.
- 
PTRepresents a size in points.
- 
PCRepresents a size in picas.
- 
PXRepresents a size in pixels.
- 
DEGRepresents an angle in degrees.
- 
GRADRepresents an angle in gradians. Note: 400 Gradians = 360 Degrees.
- 
RADRepresents an angle in radians.
- 
TURNRepresents an angle in turns. Note: 1 Turn = 360 Degrees.
- 
SRepresents time in seconds.
- 
MSRepresents time in milliseconds.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
pointsCalculates points for a particularSizeUnits.- Parameters:
- value- value
- multiplier- multiplier
- font- font
- Returns:
- points for a particular SizeUnits
 
- 
pixelsCalculates pixels for a particularSizeUnits.- Parameters:
- value- value
- multiplier- multiplier
- font- font
- Returns:
- pixels for a particular SizeUnits
 
- 
isAbsolutepublic boolean isAbsolute()Gets wehther thisSizeUnitsvalue is absolute.- Returns:
- whether value is absoulute
 
 
-