Package org.jfree.chart.axis
Class AxisLocation
- java.lang.Object
-
- org.jfree.chart.axis.AxisLocation
-
- All Implemented Interfaces:
java.io.Serializable
public final class AxisLocation extends java.lang.Object implements java.io.SerializableUsed to indicate the location of an axis on a 2D plot, prior to knowing the orientation of the plot.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AxisLocationBOTTOM_OR_LEFTAxis at the bottom or left.static AxisLocationBOTTOM_OR_RIGHTAxis at the bottom or right.private java.lang.StringnameThe name.private static longserialVersionUIDFor serialization.static AxisLocationTOP_OR_LEFTAxis at the top or left.static AxisLocationTOP_OR_RIGHTAxis at the top or right.
-
Constructor Summary
Constructors Modifier Constructor Description privateAxisLocation(java.lang.String name)Private constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returnstrueif this object is equal to the specified object, andfalseotherwise.AxisLocationgetOpposite()Returns the location that is opposite to this location.static AxisLocationgetOpposite(AxisLocation location)Returns the location that is opposite to the supplied location.inthashCode()Returns a hash code for this instance.private java.lang.ObjectreadResolve()Ensures that serialization returns the unique instances.java.lang.StringtoString()Returns a string representing the object.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
TOP_OR_LEFT
public static final AxisLocation TOP_OR_LEFT
Axis at the top or left.
-
TOP_OR_RIGHT
public static final AxisLocation TOP_OR_RIGHT
Axis at the top or right.
-
BOTTOM_OR_LEFT
public static final AxisLocation BOTTOM_OR_LEFT
Axis at the bottom or left.
-
BOTTOM_OR_RIGHT
public static final AxisLocation BOTTOM_OR_RIGHT
Axis at the bottom or right.
-
name
private final java.lang.String name
The name.
-
-
Method Detail
-
getOpposite
public AxisLocation getOpposite()
Returns the location that is opposite to this location.- Returns:
- The opposite location.
-
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 obj)
Returnstrueif this object is equal to the specified object, andfalseotherwise.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the other object (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
getOpposite
public static AxisLocation getOpposite(AxisLocation location)
Returns the location that is opposite to the supplied location.- Parameters:
location- the location (nullnot permitted).- Returns:
- The opposite location.
-
readResolve
private java.lang.Object readResolve() throws java.io.ObjectStreamExceptionEnsures that serialization returns the unique instances.- Returns:
- The object.
- Throws:
java.io.ObjectStreamException- if there is a problem.
-
-