public final class RectangleEdge extends Object implements 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(Rectangle2D rectangle,
RectangleEdge edge)
Returns the x or y coordinate of the specified edge.
|
boolean |
equals(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.
|
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 String toString()
public boolean equals(Object o)
true
if this object is equal to the specified
object, and false
otherwise.public int hashCode()
public 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(Rectangle2D rectangle, RectangleEdge edge)
rectangle
- the rectangle.edge
- the edge.Copyright © 2001–2017 JFree.org. All rights reserved.