Class RectangleAnchor
java.lang.Object
org.jfree.ui.RectangleAnchor
- All Implemented Interfaces:
Serializable
Used to indicate an anchor point for a rectangle.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RectangleAnchorBottom.static final RectangleAnchorBottom-Left.static final RectangleAnchorBottom-Right.static final RectangleAnchorCenter.static final RectangleAnchorLeft.static final RectangleAnchorRight.static final RectangleAnchorTop.static final RectangleAnchorTop-Left.static final RectangleAnchorTop-Right. -
Method Summary
Modifier and TypeMethodDescriptionstatic Point2Dcoordinates(Rectangle2D rectangle, RectangleAnchor anchor) Returns the (x, y) coordinates of the specified anchor.static Rectangle2DcreateRectangle(Size2D dimensions, double anchorX, double anchorY, RectangleAnchor anchor) Creates a new rectangle with the specified dimensions that is aligned to the given anchor point(anchorX, anchorY).booleanReturnstrueif this object is equal to the specified object, andfalseotherwise.inthashCode()Returns a hash code value for the object.toString()Returns a string representing the object.
-
Field Details
-
CENTER
Center. -
TOP
Top. -
TOP_LEFT
Top-Left. -
TOP_RIGHT
Top-Right. -
BOTTOM
Bottom. -
BOTTOM_LEFT
Bottom-Left. -
BOTTOM_RIGHT
Bottom-Right. -
LEFT
Left. -
RIGHT
Right.
-
-
Method Details
-
toString
-
equals
-
hashCode
-
coordinates
Returns the (x, y) coordinates of the specified anchor.- Parameters:
rectangle- the rectangle.anchor- the anchor.- Returns:
- The (x, y) coordinates.
-
createRectangle
public static Rectangle2D createRectangle(Size2D dimensions, double anchorX, double anchorY, RectangleAnchor anchor) Creates a new rectangle with the specified dimensions that is aligned to the given anchor point(anchorX, anchorY).- Parameters:
dimensions- the dimensions (nullnot permitted).anchorX- the x-anchor.anchorY- the y-anchor.anchor- the anchor (nullnot permitted).- Returns:
- A rectangle.
-