Package org.jfree.chart.ui
Class RectangleEdge
java.lang.Object
org.jfree.chart.ui.RectangleEdge
- All Implemented Interfaces:
Serializable
public final class RectangleEdge extends Object implements Serializable
Used to indicate the edge of a rectangle.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static RectangleEdgeBOTTOMBottom.static RectangleEdgeLEFTLeft.static RectangleEdgeRIGHTRight.static RectangleEdgeTOPTop. -
Method Summary
Modifier and Type Method Description static doublecoordinate(Rectangle2D rectangle, RectangleEdge edge)Returns the x or y coordinate of the specified edge.booleanequals(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.StringtoString()Returns a string representing the object.
-
Field Details
-
TOP
Top. -
BOTTOM
Bottom. -
LEFT
Left. -
RIGHT
Right.
-
-
Method Details
-
toString
Returns a string representing the object. -
equals
Returnstrueif this object is equal to the specified object, andfalseotherwise. -
hashCode
Returns a hash code value for the object. -
isTopOrBottom
Returnstrueif the edge isTOPorBOTTOM, andfalseotherwise.- Parameters:
edge- the edge.- Returns:
- A boolean.
-
isLeftOrRight
Returnstrueif the edge isLEFTorRIGHT, andfalseotherwise.- Parameters:
edge- the edge.- Returns:
- A boolean.
-
opposite
Returns the opposite edge.- Parameters:
edge- an edge.- Returns:
- The opposite edge.
-
coordinate
Returns the x or y coordinate of the specified edge.- Parameters:
rectangle- the rectangle.edge- the edge.- Returns:
- The coordinate.
-