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
The base class used to represent labeled ticks along an axis.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
    The rotation angle.
    private org.jfree.ui.TextAnchor
    The rotation anchor for the tick label.
    private static final long
    For serialization.
    private String
    A text version of the tick value.
    private org.jfree.ui.TextAnchor
    The text anchor for the tick label.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tick(String text, org.jfree.ui.TextAnchor textAnchor, org.jfree.ui.TextAnchor rotationAnchor, double angle)
    Creates a new tick.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a clone of the tick.
    boolean
    Tests this tick for equality with an arbitrary object.
    double
    Returns the angle.
    org.jfree.ui.TextAnchor
    Returns the text anchor that defines the point around which the label is rotated.
    Returns the text version of the tick value.
    org.jfree.ui.TextAnchor
    Returns the text anchor.
    Returns a string representation of the tick.

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • text

      private String text
      A text version of the tick value.
    • textAnchor

      private org.jfree.ui.TextAnchor textAnchor
      The text anchor for the tick label.
    • rotationAnchor

      private org.jfree.ui.TextAnchor rotationAnchor
      The rotation anchor for the tick label.
    • angle

      private double angle
      The rotation angle.
  • 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 (null not permitted).
      rotationAnchor - the rotation anchor (null not permitted).
      angle - the angle.
  • Method Details

    • getText

      public String 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

      public boolean equals(Object obj)
      Tests this tick for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of the tick.
      Overrides:
      clone in class Object
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if there is a problem cloning.
    • toString

      public String toString()
      Returns a string representation of the tick.
      Overrides:
      toString in class Object
      Returns:
      A string.