- All Implemented Interfaces:
Serializable
,Comparable<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 Summary
Enum ConstantsEnum ConstantDescriptionCentered relative to the upper and lower edges and the left and right edges.Centered vertically at left edge.Centered vertically at right edge.Lower edge at its center.Lower-left corner.Lower-right corner.Upper-edge at its center.Upper-left corner.Upper-right corner. -
Method Summary
Modifier and TypeMethodDescriptionstatic RefPointName
Returns the enum constant of this type with the specified name.static RefPointName[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UPPER_LEFT
Upper-left corner. -
UPPER_CENTER
Upper-edge at its center. -
UPPER_RIGHT
Upper-right corner. -
CENTER_LEFT
Centered vertically at left edge. -
CENTER
Centered relative to the upper and lower edges and the left and right edges. -
CENTER_RIGHT
Centered vertically at right edge. -
LOWER_LEFT
Lower-left corner. -
LOWER_CENTER
Lower edge at its center. -
LOWER_RIGHT
Lower-right corner.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-