public final class RectangleEdge
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static RectangleEdge |
BOTTOM
Bottom.
|
static RectangleEdge |
LEFT
Left.
|
static RectangleEdge |
RIGHT
Right.
|
static RectangleEdge |
TOP
Top.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
coordinate(java.awt.geom.Rectangle2D rectangle,
RectangleEdge 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. |
int |
hashCode()
Returns a hash code value for the object.
|
static boolean |
isLeftOrRight(RectangleEdge edge)
Returns
true if the edge is LEFT or
RIGHT, and false otherwise. |
static boolean |
isTopOrBottom(RectangleEdge edge)
Returns
true if the edge is TOP or
BOTTOM, and false otherwise. |
static RectangleEdge |
opposite(RectangleEdge edge)
Returns the opposite edge.
|
java.lang.String |
toString()
Returns a string representing the object.
|
public static final RectangleEdge TOP
public static final RectangleEdge BOTTOM
public static final RectangleEdge LEFT
public static final RectangleEdge RIGHT
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
true if this object is equal to the specified
object, and false otherwise.equals in class java.lang.Objecto - the other object.public int hashCode()
hashCode in class java.lang.Objectpublic static boolean isTopOrBottom(RectangleEdge edge)
true if the edge is TOP or
BOTTOM, and false otherwise.edge - the edge.public static boolean isLeftOrRight(RectangleEdge edge)
true if the edge is LEFT or
RIGHT, and false otherwise.edge - the edge.public static RectangleEdge opposite(RectangleEdge edge)
edge - an edge.public static double coordinate(java.awt.geom.Rectangle2D rectangle,
RectangleEdge edge)
rectangle - the rectangle.edge - the edge.