Package org.jfree.ui
Class RectangleEdge
- java.lang.Object
-
- org.jfree.ui.RectangleEdge
-
- All Implemented Interfaces:
java.io.Serializable
public final class RectangleEdge extends java.lang.Object implements java.io.Serializable
Used to indicate the edge of a rectangle.- Author:
- David Gilbert
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static RectangleEdgeBOTTOMBottom.static RectangleEdgeLEFTLeft.static RectangleEdgeRIGHTRight.static RectangleEdgeTOPTop.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doublecoordinate(java.awt.geom.Rectangle2D rectangle, RectangleEdge edge)Returns the x or y coordinate of the specified edge.booleanequals(java.lang.Object o)Returnstrueif this object is equal to the specified object, andfalseotherwise.inthashCode()Returns a hash code value for the object.static booleanisLeftOrRight(RectangleEdge edge)Returnstrueif the edge isLEFTorRIGHT, andfalseotherwise.static booleanisTopOrBottom(RectangleEdge edge)Returnstrueif the edge isTOPorBOTTOM, andfalseotherwise.static RectangleEdgeopposite(RectangleEdge edge)Returns the opposite edge.java.lang.StringtoString()Returns a string representing the object.
-
-
-
Field Detail
-
TOP
public static final RectangleEdge TOP
Top.
-
BOTTOM
public static final RectangleEdge BOTTOM
Bottom.
-
LEFT
public static final RectangleEdge LEFT
Left.
-
RIGHT
public static final RectangleEdge RIGHT
Right.
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a string representing the object.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string.
-
equals
public boolean equals(java.lang.Object o)
Returnstrueif this object is equal to the specified object, andfalseotherwise.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the other object.- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code value for the object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hashcode
-
isTopOrBottom
public static boolean isTopOrBottom(RectangleEdge edge)
Returnstrueif the edge isTOPorBOTTOM, andfalseotherwise.- Parameters:
edge- the edge.- Returns:
- A boolean.
-
isLeftOrRight
public static boolean isLeftOrRight(RectangleEdge edge)
Returnstrueif the edge isLEFTorRIGHT, andfalseotherwise.- Parameters:
edge- the edge.- Returns:
- A boolean.
-
opposite
public static RectangleEdge opposite(RectangleEdge edge)
Returns the opposite edge.- Parameters:
edge- an edge.- Returns:
- The opposite edge.
-
coordinate
public static double coordinate(java.awt.geom.Rectangle2D rectangle, RectangleEdge edge)
Returns the x or y coordinate of the specified edge.- Parameters:
rectangle- the rectangle.edge- the edge.- Returns:
- The coordinate.
-
-