Enum Class HangingPunctuation

java.lang.Object
java.lang.Enum<HangingPunctuation>
com.oorian.css.HangingPunctuation
All Implemented Interfaces:
Serializable, Comparable<HangingPunctuation>, Constable

public enum HangingPunctuation extends Enum<HangingPunctuation>
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:
  • TextIntf
  • Enum Constant Details

    • INITIAL

      public static final HangingPunctuation INITIAL
      Sets to default value.
    • INHERIT

      public static final HangingPunctuation INHERIT
      Inherits from parent element.
    • NONE

      public static final HangingPunctuation NONE
      No punctuation hangs (default).
    • FIRST

      public static final HangingPunctuation FIRST
      Opening bracket or quote may hang at start.
    • LAST

      public static final HangingPunctuation LAST
      Closing bracket or quote may hang at end.
    • ALLOW_END

      public static final HangingPunctuation ALLOW_END
      End punctuation hangs if it doesn't fit.
    • FORCE_END

      public static final HangingPunctuation FORCE_END
      End punctuation always hangs.
  • Method Details

    • values

      public static HangingPunctuation[] 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

      public static HangingPunctuation valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<HangingPunctuation>
      Returns:
      the CSS value