org.jfree.ui
Class RectangleAnchor

java.lang.Object
  extended byorg.jfree.ui.RectangleAnchor
All Implemented Interfaces:
java.io.Serializable

public class RectangleAnchor
extends java.lang.Object
implements java.io.Serializable

Used to indicate an anchor point for a rectangle.

Author:
David Gilbert
See Also:
Serialized Form

Field Summary
static RectangleAnchor BOTTOM
          Bottom.
static RectangleAnchor BOTTOM_LEFT
          Bottom-Left.
static RectangleAnchor BOTTOM_RIGHT
          Bottom-Right.
static RectangleAnchor CENTER
          Center.
static RectangleAnchor LEFT
          Left.
static RectangleAnchor RIGHT
          Right.
static RectangleAnchor TOP
          Top.
static RectangleAnchor TOP_LEFT
          Top-Left.
static RectangleAnchor TOP_RIGHT
          Top-Right.
 
Method Summary
static double[] coordinates(java.awt.geom.Rectangle2D rectangle, RectangleAnchor edge)
          Returns the x or y coordinate of the specified edge.
 boolean equals(java.lang.Object o)
          Returns true if this object is equal to the specified object, and false otherwise.
 java.lang.String toString()
          Returns a string representing the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CENTER

public static final RectangleAnchor CENTER
Center.


TOP

public static final RectangleAnchor TOP
Top.


TOP_LEFT

public static final RectangleAnchor TOP_LEFT
Top-Left.


TOP_RIGHT

public static final RectangleAnchor TOP_RIGHT
Top-Right.


BOTTOM

public static final RectangleAnchor BOTTOM
Bottom.


BOTTOM_LEFT

public static final RectangleAnchor BOTTOM_LEFT
Bottom-Left.


BOTTOM_RIGHT

public static final RectangleAnchor BOTTOM_RIGHT
Bottom-Right.


LEFT

public static final RectangleAnchor LEFT
Left.


RIGHT

public static final RectangleAnchor RIGHT
Right.

Method Detail

toString

public java.lang.String toString()
Returns a string representing the object.

Returns:
The string.

equals

public boolean equals(java.lang.Object o)
Returns true if this object is equal to the specified object, and false otherwise.

Parameters:
o - the other object.
Returns:
A boolean.

coordinates

public static double[] coordinates(java.awt.geom.Rectangle2D rectangle,
                                   RectangleAnchor edge)
Returns the x or y coordinate of the specified edge.

Parameters:
rectangle - the rectangle.
edge - the edge.
Returns:
The coordinate.