Package com.oorian.css
Enum Class FontStretch
- All Implemented Interfaces:
Serializable,Comparable<FontStretch>,Constable
CSS font-stretch property values for font width selection.
The font-stretch property selects a normal, condensed, or expanded face from a font family. Values range from ultra-condensed (50%) to ultra-expanded (200%) of normal width.
Width Scale:
- ultra-condensed: 50% of normal width
- extra-condensed: 62.5% of normal width
- condensed: 75% of normal width
- semi-condensed: 87.5% of normal width
- normal: 100% width (default)
- semi-expanded: 112.5% of normal width
- expanded: 125% of normal width
- extra-expanded: 150% of normal width
- ultra-expanded: 200% of normal width
Usage:
element.setFontStretch(FontStretch.CONDENSED);
element.setFontStretch(FontStretch.EXPANDED);
- Since:
- 2012
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- 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 ConstantDescriptionNarrow width (75% of normal).Wide width (125% of normal).Very narrow width (62.5% of normal).Very wide (150% of normal).Inherits from parent element.Sets to default value.Standard width (100%, default).Slightly narrow width (87.5% of normal).Slightly wide (112.5% of normal).Narrowest width (50% of normal).Widest width (200% of normal). -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static FontStretchReturns the enum constant of this class with the specified name.static FontStretch[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ULTRA_CONDENSED
Narrowest width (50% of normal). -
EXTRA_CONDENSED
Very narrow width (62.5% of normal). -
CONDENSED
Narrow width (75% of normal). -
SEMI_CONDENSED
Slightly narrow width (87.5% of normal). -
NORMAL
Standard width (100%, default). -
SEMI_EXPANDED
Slightly wide (112.5% of normal). -
EXPANDED
Wide width (125% of normal). -
EXTRA_EXPANDED
Very wide (150% of normal). -
ULTRA_EXPANDED
Widest width (200% of normal). -
INITIAL
Sets to default value. -
INHERIT
Inherits from parent element.
-
-
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
-
getValue
Returns the CSS value string.- Returns:
- the CSS value
-
toString
Returns the CSS value string.- Overrides:
toStringin classEnum<FontStretch>- Returns:
- the CSS value
-