Package com.oorian.css
Enum Class HangingPunctuation
- All Implemented Interfaces:
Serializable,Comparable<HangingPunctuation>,Constable
CSS hanging-punctuation property values for punctuation placement.
The hanging-punctuation property specifies whether punctuation marks may hang outside the content box of a text element. This improves visual alignment of text blocks.
Hanging Values:
- first: Opening bracket or quote may hang
- last: Closing bracket or quote may hang
- allow-end: Stops or commas at end may hang
- force-end: Stops or commas at end always hang
Usage:
element.setHangingPunctuation(HangingPunctuation.FIRST);
paragraph.setHangingPunctuation(HangingPunctuation.ALLOW_END);
- 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 ConstantDescriptionEnd punctuation hangs if it doesn't fit.Opening bracket or quote may hang at start.End punctuation always hangs.Inherits from parent element.Sets to default value.Closing bracket or quote may hang at end.No punctuation hangs (default). -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static HangingPunctuationReturns the enum constant of this class with the specified name.static HangingPunctuation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INITIAL
Sets to default value. -
INHERIT
Inherits from parent element. -
NONE
No punctuation hangs (default). -
FIRST
Opening bracket or quote may hang at start. -
LAST
Closing bracket or quote may hang at end. -
ALLOW_END
End punctuation hangs if it doesn't fit. -
FORCE_END
End punctuation always hangs.
-
-
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<HangingPunctuation>- Returns:
- the CSS value
-