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
public abstract class Tick extends Object implements Serializable, Cloneable
Represents the dimensions of a tick on an axis (used during the process of
drawing a chart, but not retained).
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Objectclone()Returns a clone of the tick.booleanequals(Object obj)Tests this tick for equality with an arbitrary object.doublegetAngle()Returns the angle.org.jfree.ui.TextAnchorgetRotationAnchor()Returns the text anchor that defines the point around which the label is rotated.StringgetText()Returns the text version of the tick value.org.jfree.ui.TextAnchorgetTextAnchor()Returns the text anchor.StringtoString()Returns a string representation of the tick.
-
Constructor Details
-
Tick
public Tick(String text, org.jfree.ui.TextAnchor textAnchor, org.jfree.ui.TextAnchor rotationAnchor, double angle)Creates a new tick.- Parameters:
text- the formatted version of the tick value.textAnchor- the text anchor (nullnot permitted).rotationAnchor- the rotation anchor (nullnot permitted).angle- the angle.
-
-
Method Details
-
getText
Returns the text version of the tick value.- Returns:
- A string (possibly
null;
-
getTextAnchor
public org.jfree.ui.TextAnchor getTextAnchor()Returns the text anchor.- Returns:
- The text anchor (never
null).
-
getRotationAnchor
public org.jfree.ui.TextAnchor 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. -
clone
Returns a clone of the tick.- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if there is a problem cloning.
-
toString
Returns a string representation of the tick.
-