Enum Constant and Description |
---|
cm
centimeter
|
em
one em is equal to the current font size of the current element
|
ex
one ex is the x-height of a font (x-height is usually about half the
font-size)
|
in
inch
|
mm
millimeter
|
pc
pica (1 pc is the same as 12 points)
|
prc
percentage
|
pt
point (1 pt is the same as 1/72 inch)
|
px
pixels (a dot on the computer screen)
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
static Unit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Unit prc
public static final Unit in
public static final Unit cm
public static final Unit mm
public static final Unit em
public static final Unit ex
public static final Unit pt
public static final Unit pc
public static final Unit px
public static Unit[] values()
for (Unit c : Unit.values()) System.out.println(c);
public static Unit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<Unit>