Enum Class TextAlignLast

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

public enum TextAlignLast extends Enum<TextAlignLast>
CSS text-align-last property values for last line alignment.

The text-align-last property specifies how the last line of a block element or the line before a forced break is aligned. This is useful for justified text blocks.

Alignment Values:

  • auto: Inherits from text-align (default)
  • left/right: Aligns to left/right edge
  • center: Centers the last line
  • justify: Justifies the last line
  • start/end: Direction-aware alignment

Usage:


 paragraph.setTextAlignLast(TextAlignLast.CENTER);
 element.setTextAlignLast(TextAlignLast.START);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • INITIAL

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

      public static final TextAlignLast INHERIT
      Inherits from parent element.
    • AUTO

      public static final TextAlignLast AUTO
      Uses text-align value except for justified text (default).
    • LEFT

      public static final TextAlignLast LEFT
      Aligns last line to the left.
    • CENTER

      public static final TextAlignLast CENTER
      Centers the last line.
    • JUSTIFY

      public static final TextAlignLast JUSTIFY
      Justifies the last line.
    • START

      public static final TextAlignLast START
      Aligns to start based on text direction.
    • END

      public static final TextAlignLast END
      Aligns to end based on text direction.
  • Method Details

    • values

      public static TextAlignLast[] 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 TextAlignLast 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<TextAlignLast>
      Returns:
      the CSS value