org.jfree.ui
Class RectangleAnchor
java.lang.Objectorg.jfree.ui.RectangleAnchor
- Serializable
extends java.lang.Object
implements Serializable
Used to indicate an anchor point for a rectangle.
static Point2D | coordinates(Rectangle2D rectangle, RectangleAnchor anchor)- Returns the (x, y) coordinates of the specified anchor.
|
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).
|
boolean | equals(Object obj)- Returns
true if this object is equal to the specified
object, and false otherwise.
|
int | hashCode()- Returns a hash code value for the object.
|
String | toString()- Returns a string representing the object.
|
coordinates
public static Point2D coordinates(Rectangle2D rectangle,
RectangleAnchor anchor) Returns the (x, y) coordinates of the specified anchor.
rectangle - the rectangle.anchor - the anchor.
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).
dimensions - the dimensions (null not permitted).anchorX - the x-anchor.anchorY - the y-anchor.anchor - the anchor (null not permitted).
equals
public boolean equals(Object obj)
Returns true if this object is equal to the specified
object, and false otherwise.
obj - the other object (null permitted).
hashCode
public int hashCode()
Returns a hash code value for the object.
toString
public String toString()
Returns a string representing the object.