- java.lang.Object
-
- java.lang.Enum<RectangleAlignment>
-
- org.jfree.chart.api.RectangleAlignment
-
- All Implemented Interfaces:
Serializable,Comparable<RectangleAlignment>
public enum RectangleAlignment extends Enum<RectangleAlignment>
Used to indicate how to align one rectangle with another rectangle.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTTOM_CENTERAlign to the bottom of the frame.BOTTOM_LEFTAlign to the bottom left of the frame.BOTTOM_RIGHTAlign to the bottom right of the frame.CENTERAlign to the center of the frame.CENTER_LEFTAlign to the left side of the frame, centered vertically.CENTER_RIGHTAlign to the right side of the frame, centered vertically.FILLFill the frameFILL_HORIZONTALFill the width of the frame.FILL_VERTICALFill the height of the frame.TOP_CENTERAlign to the top of the frame.TOP_LEFTAlign to the top left of the frame.TOP_RIGHTAlign to the top right of the frame.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalign(Rectangle2D rect, Rectangle2D frame)Returns the anchor point relative to the specified rectangle.static RectangleAlignmentvalueOf(String name)Returns the enum constant of this type with the specified name.static RectangleAlignment[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FILL
public static final RectangleAlignment FILL
Fill the frame
-
FILL_VERTICAL
public static final RectangleAlignment FILL_VERTICAL
Fill the height of the frame.
-
FILL_HORIZONTAL
public static final RectangleAlignment FILL_HORIZONTAL
Fill the width of the frame.
-
TOP_LEFT
public static final RectangleAlignment TOP_LEFT
Align to the top left of the frame.
-
TOP_CENTER
public static final RectangleAlignment TOP_CENTER
Align to the top of the frame.
-
TOP_RIGHT
public static final RectangleAlignment TOP_RIGHT
Align to the top right of the frame.
-
CENTER_LEFT
public static final RectangleAlignment CENTER_LEFT
Align to the left side of the frame, centered vertically.
-
CENTER
public static final RectangleAlignment CENTER
Align to the center of the frame.
-
CENTER_RIGHT
public static final RectangleAlignment CENTER_RIGHT
Align to the right side of the frame, centered vertically.
-
BOTTOM_LEFT
public static final RectangleAlignment BOTTOM_LEFT
Align to the bottom left of the frame.
-
BOTTOM_CENTER
public static final RectangleAlignment BOTTOM_CENTER
Align to the bottom of the frame.
-
BOTTOM_RIGHT
public static final RectangleAlignment BOTTOM_RIGHT
Align to the bottom right of the frame.
-
-
Method Detail
-
values
public static RectangleAlignment[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RectangleAlignment c : RectangleAlignment.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RectangleAlignment 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 nameNullPointerException- if the argument is null
-
align
public void align(Rectangle2D rect, Rectangle2D frame)
Returns the anchor point relative to the specified rectangle.- Parameters:
rect- the rectangle to align (nullnot permitted).frame- the frame to align with (nullnot permitted).
-
-