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.private StringThe name.static final RectangleEdgeRight.private static final longFor serialization.static final RectangleEdgeTop. -
Constructor Summary
Constructors -
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.private ObjectEnsures that serialization returns the unique instances.toString()Returns a string representing the object.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
TOP
Top. -
BOTTOM
Bottom. -
LEFT
Left. -
RIGHT
Right. -
name
The name.
-
-
Constructor Details
-
RectangleEdge
Private constructor.- Parameters:
name- the name.
-
-
Method Details
-
toString
Returns a string representing the object. -
equals
Returnstrueif this object is equal to the specified object, andfalseotherwise. -
hashCode
public int 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.
-
readResolve
Ensures that serialization returns the unique instances.- Returns:
- The object.
- Throws:
ObjectStreamException- if there is a problem.
-