Enum Class Unit
- All Implemented Interfaces:
Serializable
,Comparable<Unit>
,Constable
Units used in dimensions of UI elements.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAutomatic size, irrespective of dimension value.Relative to size of the element, equivalent tovh
in CSS.Relative to parent size, equivelent to%
in CSS.Absolute size in pixels, equivalent topx
in CSS.Relative to viewport height, equivalent tovh
in CSS.Relative to viewport width, equivalent tovh
in CSS. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static boolean
static boolean
static Unit
static String
static Unit
Returns the enum constant of this class with the specified name.static Unit[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Automatic size, irrespective of dimension value. -
PIXELS
Absolute size in pixels, equivalent topx
in CSS. -
ELEMENT_SIZE
Relative to size of the element, equivalent tovh
in CSS. -
VIEWPORT_WIDTH
Relative to viewport width, equivalent tovh
in CSS. Value100
corresponds to the full width of the viewport. -
VIEWPORT_HEIGHT
Relative to viewport height, equivalent tovh
in CSS. Value100
corresponds to the full height of the viewport. -
PERCENTAGE
Relative to parent size, equivelent to%
in CSS.
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException
- if the argument is null
-
isFixed
-
isDynamic
-
toString
-
isValid
-
parse
- Throws:
IllegalArgumentException
-