Enum Class TextAlignment

java.lang.Object
java.lang.Enum<TextAlignment>
host.anzo.commons.graphics.text.TextAlignment
All Implemented Interfaces:
Serializable, Comparable<TextAlignment>, Constable

public enum TextAlignment extends Enum<TextAlignment>
An enumerator which indicates where text should be positioned.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Text should be aligned to the bottom of the target bounds.
    Text should be aligned to the bottom-left of the target bounds.
    Text should be aligned to the bottom-right of the target bounds.
    Text should be aligned to the middle of the target bounds.
    Text should be aligned to the left of the target bounds.
    Text should be aligned to the right of the target bounds.
    Text should be aligned to the top of the target bounds.
    Text should be aligned to the top-left of the target bounds.
    Text should be aligned to the top-right of the target bounds.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets whether the text alignment is aligned to the bottom.
    boolean
    Gets whether the text alignment is centered horizontally.
    boolean
    Gets whether the text alignment is aligned to the left.
    boolean
    Gets whether the text alignment is aligned to the middle.
    boolean
    Gets whether the text alignment is aligned to the right.
    boolean
    Gets whether the text alignment is aligned to the top.
    Returns the enum constant of this class with the specified name.
    static TextAlignment[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • TOP_LEFT

      public static final TextAlignment TOP_LEFT
      Text should be aligned to the top-left of the target bounds.
    • TOP

      public static final TextAlignment TOP
      Text should be aligned to the top of the target bounds.
    • TOP_RIGHT

      public static final TextAlignment TOP_RIGHT
      Text should be aligned to the top-right of the target bounds.
    • MIDDLE_LEFT

      public static final TextAlignment MIDDLE_LEFT
      Text should be aligned to the left of the target bounds.
    • MIDDLE

      public static final TextAlignment MIDDLE
      Text should be aligned to the middle of the target bounds.
    • MIDDLE_RIGHT

      public static final TextAlignment MIDDLE_RIGHT
      Text should be aligned to the right of the target bounds.
    • BOTTOM_LEFT

      public static final TextAlignment BOTTOM_LEFT
      Text should be aligned to the bottom-left of the target bounds.
    • BOTTOM

      public static final TextAlignment BOTTOM
      Text should be aligned to the bottom of the target bounds.
    • BOTTOM_RIGHT

      public static final TextAlignment BOTTOM_RIGHT
      Text should be aligned to the bottom-right of the target bounds.
  • Method Details

    • values

      public static TextAlignment[] 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 TextAlignment 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
    • isBottom

      public boolean isBottom()
      Gets whether the text alignment is aligned to the bottom.
      Returns:
      true if the text alignment is aligned to the bottom; otherwise, false
    • isCenter

      public boolean isCenter()
      Gets whether the text alignment is centered horizontally.
      Returns:
      true if the text alignment is horizontally centered; otherwise, false
    • isLeft

      public boolean isLeft()
      Gets whether the text alignment is aligned to the left.
      Returns:
      true if the text alignment is aligned to the left; otherwise, false
    • isMiddle

      public boolean isMiddle()
      Gets whether the text alignment is aligned to the middle.
      Returns:
      true if the text alignment is aligned to the middle; otherwise, false
    • isRight

      public boolean isRight()
      Gets whether the text alignment is aligned to the right.
      Returns:
      true if the text alignment is aligned to the right; otherwise, false
    • isTop

      public boolean isTop()
      Gets whether the text alignment is aligned to the top.
      Returns:
      true if the text alignment is aligned to the top; otherwise, false