Package codedraw

Enum Class TextOrigin

All Implemented Interfaces:
Serializable, Comparable<TextOrigin>, Constable

public enum TextOrigin extends Enum<TextOrigin>
Horizontally and vertically aligns text. The origin describes where the text is placed relative to the specified (x, y) coordinates.
  • Enum Constant Details

    • TOP_LEFT

      public static final TextOrigin TOP_LEFT
      The origin will be to the top left of the text. The text will be drawn to the right below the (x, y) coordinate.
      
                      |
       -------------- + --------------
                      | Text goes here
       
    • TOP_MIDDLE

      public static final TextOrigin TOP_MIDDLE
      The origin will be to the top center of the text. The text will be drawn centrally below the (x, y) coordinate.
      
                      |
       -------------- + --------------
                Text goes here
       
    • TOP_RIGHT

      public static final TextOrigin TOP_RIGHT
      The origin will be to the top right of the text. The text will be drawn to the left below the (x, y) coordinate.
      
                      |
       -------------- + --------------
       Text goes here |
       
    • CENTER_LEFT

      public static final TextOrigin CENTER_LEFT
      The origin will be to the center left of the text. The text will be drawn to the centered right of the (x, y) coordinate.
      
                      |
       -------------- + Text goes here
                      |
       
    • CENTER

      public static final TextOrigin CENTER
      The origin will be exactly at the center of the text. The text will be drawn around the (x, y) coordinate.
      
                      |
       ------- Text go+es here -------
                      |
       
    • CENTER_RIGHT

      public static final TextOrigin CENTER_RIGHT
      The origin will be to the center right of the text. The text will be drawn to the centered left of the (x, y) coordinate.
      
                      |
       Text goes here + --------------
                      |
       
    • BOTTOM_LEFT

      public static final TextOrigin BOTTOM_LEFT
      The origin will be to the bottom left of the text. The text will be drawn to the right above the (x, y) coordinate.
      
                      | Text goes here
       -------------- + --------------
                      |
       
    • BOTTOM_MIDDLE

      public static final TextOrigin BOTTOM_MIDDLE
      The origin will be to the bottom center of the text. The text will be drawn centrally above the (x, y) coordinate.
      
               Text goes here
       -------------- + --------------
                      |
       
    • BOTTOM_RIGHT

      public static final TextOrigin BOTTOM_RIGHT
      The origin will be to the bottom right of the text. The text will be drawn to the left above the (x, y) coordinate.
      
       Text goes here |
       -------------- + --------------
                      |
       
  • Method Details

    • values

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