org.jfree.chart.axis
Class Tick

java.lang.Object
  extended byorg.jfree.chart.axis.Tick
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
CategoryTick, ValueTick

public abstract class Tick
extends java.lang.Object
implements java.io.Serializable, java.lang.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
Tick(java.lang.String text, TextAnchor textAnchor, TextAnchor rotationAnchor, double angle)
          Creates a new tick.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the tick.
 boolean equals(java.lang.Object obj)
          Tests this tick for equality with an arbitrary object.
 double getAngle()
          Returns the angle.
 TextAnchor getRotationAnchor()
          Returns the text anchor that defines the point around which the label is rotated.
 java.lang.String getText()
          Returns the text version of the tick value.
 TextAnchor getTextAnchor()
          Returns the text anchor.
 java.lang.String toString()
          Returns a string representation of the tick.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tick

public Tick(java.lang.String text,
            TextAnchor textAnchor,
            TextAnchor rotationAnchor,
            double angle)
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 Detail

getText

public java.lang.String getText()
Returns the text version of the tick value.

Returns:
A string (possibly null;

getTextAnchor

public TextAnchor getTextAnchor()
Returns the text anchor.

Returns:
The text anchor (never null).

getRotationAnchor

public 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

public boolean equals(java.lang.Object obj)
Tests this tick for equality with an arbitrary object.

Parameters:
obj - the object (null permitted).
Returns:
A boolean.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the tick.

Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if there is a problem cloning.

toString

public java.lang.String toString()
Returns a string representation of the tick.

Returns:
A string.