Package org.jfree.chart.axis
Class Tick
java.lang.Object
org.jfree.chart.axis.Tick
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
CategoryTick
,ValueTick
The base class used to represent labeled ticks along an axis.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
The rotation angle.private TextAnchor
The rotation anchor for the tick label.private static final long
For serialization.private String
A text version of the tick value.private TextAnchor
The text anchor for the tick label. -
Constructor Summary
ConstructorsConstructorDescriptionTick
(String text, TextAnchor textAnchor, TextAnchor rotationAnchor, double angle) Creates a new tick. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Ensures symmetry between super/subclass implementations of equals.clone()
Returns a clone of the tick.boolean
Tests this tick for equality with an arbitrary object.double
getAngle()
Returns the angle.Returns the text anchor that defines the point around which the label is rotated.getText()
Returns the text version of the tick value.Returns the text anchor.int
hashCode()
toString()
Returns a string representation of the tick.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
text
A text version of the tick value. -
textAnchor
The text anchor for the tick label. -
rotationAnchor
The rotation anchor for the tick label. -
angle
private double angleThe rotation angle.
-
-
Constructor Details
-
Tick
Creates a new tick.- Parameters:
text
- the formatted version of the tick value.textAnchor
- the text anchor (null
not permitted).rotationAnchor
- the rotation anchor (null
not permitted).angle
- the angle.
-
-
Method Details
-
getText
Returns the text version of the tick value.- Returns:
- A string (possibly
null
);
-
getTextAnchor
Returns the text anchor.- Returns:
- The text anchor (never
null
).
-
getRotationAnchor
Returns the text anchor that defines the point around which the label is rotated.- Returns:
- A text anchor (never
null
).
-
getAngle
public double getAngle()Returns the angle.- Returns:
- The angle.
-
equals
Tests this tick for equality with an arbitrary object. -
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Parameters:
other
- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
public int hashCode() -
clone
Returns a clone of the tick.- Overrides:
clone
in classObject
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if there is a problem cloning.
-
toString
Returns a string representation of the tick.
-