em/rem/% are stored as Unit#EM; px/pt as Unit#PX (pt converted at 96/72).
| Modifier and Type | Class and Description |
|---|---|
| public static enum | CssLength.
The unit a |
| Modifier and Type | Field and Description |
|---|---|
| private final CssLength. | |
| private final double |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public double | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| public CssLength. | |
| public double |
| unit | back to summary |
|---|---|
| private final CssLength. Record Component accessed by unit(). the unit the value is expressed in | |
| value | back to summary |
|---|---|
| private final double value Record Component accessed by value(). the numeric value, in the given unit | |
| CssLength | back to summary |
|---|---|
| public CssLength(double value, CssLength. | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| toPixels | back to summary |
|---|---|
| public double toPixels(double emSizePixels) Resolves this length to pixels.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| unit | back to summary |
|---|---|
| public CssLength. Record Component getter of unit.
| |
| value | back to summary |
|---|---|
| public double value() Record Component getter of value.
| |
CssLength is expressed in.
| Modifier and Type | Field and Description |
|---|---|
| public static final CssLength. | EM
Relative to the current font size (1 em = one font size). |
| public static final CssLength. | PX
Absolute pixels. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CssLength. | |
| public static CssLength. |
| EM | back to summary |
|---|---|
| public static final CssLength. Relative to the current font size (1 em = one font size). | |
| PX | back to summary |
|---|---|
| public static final CssLength. Absolute pixels. | |
| Unit | back to summary |
|---|---|
| private Unit() | |
| valueOf | back to summary |
|---|---|
| public static CssLength. | |
| values | back to summary |
|---|---|
| public static CssLength. | |