Class IntegerTickSelector

java.lang.Object
org.jfree.chart3d.axis.IntegerTickSelector
All Implemented Interfaces:
Serializable, TickSelector

public class IntegerTickSelector extends Object implements TickSelector, Serializable
A TickSelector implementation that selects tick units in multiples of 1, 2 and 5 and only displays integer values.

NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
Since:
1.5
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests this instance for equality with an arbitrary object.
    Returns the tick formatter associated with the tick size that the cursor is currently referencing.
    double
    Returns the tick size that the cursor is currently referencing.
    boolean
    Move the cursor to the next (larger) tick size, if there is one.
    boolean
    Move the cursor to the previous (smaller) tick size, if there is one.
    double
    select(double reference)
    Selects and returns a standard tick size that is greater than or equal to the specified reference value and, ideally, as close to it as possible (to minimise the number of iterations used by axes to determine the tick size to use).

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • select

      public double select(double reference)
      Selects and returns a standard tick size that is greater than or equal to the specified reference value and, ideally, as close to it as possible (to minimise the number of iterations used by axes to determine the tick size to use). After a call to this method, the getCurrentTickSize() method should return the selected tick size (there is a "pointer" to this tick size), the next() method should move the pointer to the next (larger) standard tick size, and the previous() method should move the pointer to the previous (smaller) standard tick size.
      Specified by:
      select in interface TickSelector
      Parameters:
      reference - the reference value (must be positive and finite).
      Returns:
      The selected tick size.
    • next

      public boolean next()
      Move the cursor to the next (larger) tick size, if there is one. Returns true in the case that the cursor is moved, and false where there are a finite number of tick sizes and the current tick size is the largest available.
      Specified by:
      next in interface TickSelector
      Returns:
      A boolean.
    • previous

      public boolean previous()
      Move the cursor to the previous (smaller) tick size, if there is one. Returns true in the case that the cursor is moved, and false where there are a finite number of tick sizes and the current tick size is the smallest available.
      Specified by:
      previous in interface TickSelector
      Returns:
      A boolean.
    • getCurrentTickSize

      public double getCurrentTickSize()
      Description copied from interface: TickSelector
      Returns the tick size that the cursor is currently referencing.
      Specified by:
      getCurrentTickSize in interface TickSelector
      Returns:
      The tick size.
    • getCurrentTickLabelFormat

      Description copied from interface: TickSelector
      Returns the tick formatter associated with the tick size that the cursor is currently referencing.
      Specified by:
      getCurrentTickLabelFormat in interface TickSelector
      Returns:
      The formatter.
    • equals

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