Package org.jfree.chart.ui
Class RectangleEdge
java.lang.Object
org.jfree.chart.ui.RectangleEdge
- All Implemented Interfaces:
Serializable
Used to indicate the edge of a rectangle.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RectangleEdgeBottom.static final RectangleEdgeLeft.static final RectangleEdgeRight.static final RectangleEdgeTop. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecoordinate(Rectangle2D rectangle, RectangleEdge edge) Returns the x or y coordinate of the specified edge.booleanReturnstrueif 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.toString()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.
-