Enum RefPointName

java.lang.Object
java.lang.Enum<RefPointName>
org.bzdev.graphs.RefPointName
All Implemented Interfaces:
Serializable, Comparable<RefPointName>

public enum RefPointName extends Enum<RefPointName>
Location of a reference point for an object to be drawn or an image. This enum is used by the class Graph to provide standard names for specific reference points.

For the class Graph, the drawImage methods make use of a reference point defined in user space assuming the upper left corner of the image corresponds to position (0,0), with positive x values to the right of a vertical line drawn through this point and positive y values below a horizontal line drawn through this point. With the image positioned at 0.0, the point on the image corresponding to the reference point becomes the point on the image that will appear at the coordinates specified by one of Graph's draw methods, and rotations of the image will occur about this point. A ReferencePointName provides symbolic names for specific reference point locations.

  • Enum Constant Details

    • UPPER_LEFT

      public static final RefPointName UPPER_LEFT
      Upper-left corner.
    • UPPER_CENTER

      public static final RefPointName UPPER_CENTER
      Upper-edge at its center.
    • UPPER_RIGHT

      public static final RefPointName UPPER_RIGHT
      Upper-right corner.
    • CENTER_LEFT

      public static final RefPointName CENTER_LEFT
      Centered vertically at left edge.
    • CENTER

      public static final RefPointName CENTER
      Centered relative to the upper and lower edges and the left and right edges.
    • CENTER_RIGHT

      public static final RefPointName CENTER_RIGHT
      Centered vertically at right edge.
    • LOWER_LEFT

      public static final RefPointName LOWER_LEFT
      Lower-left corner.
    • LOWER_CENTER

      public static final RefPointName LOWER_CENTER
      Lower edge at its center.
    • LOWER_RIGHT

      public static final RefPointName LOWER_RIGHT
      Lower-right corner.
  • Method Details

    • values

      public static RefPointName[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RefPointName valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null