Enum Class TextAlign

java.lang.Object
java.lang.Enum<TextAlign>
org.openpatch.scratch.TextAlign
All Implemented Interfaces:
Serializable, Comparable<TextAlign>, Constable

public enum TextAlign extends Enum<TextAlign>
Where a piece of text sits relative to its position.

 myText.setAlign(TextAlign.LEFT);
 
See Also:
  • Enum Constant Details

    • DEFAULT

      public static final TextAlign DEFAULT
      Whatever the text style already uses.
    • CENTER

      public static final TextAlign CENTER
      Centred on its position.
    • LEFT

      public static final TextAlign LEFT
      Its left edge at its position.
  • Method Details

    • values

      public static TextAlign[] 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 TextAlign 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
    • getMode

      public int getMode()
      Returns the number the graphics library uses for this alignment.
      Returns:
      the alignment number