java.lang.Object
org.jfree.chart3d.axis.IntegerTickSelector
- All Implemented Interfaces:
Serializable
,TickSelector
A
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.
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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
next()
Move the cursor to the next (larger) tick size, if there is one.boolean
previous()
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).
-
Constructor Details
-
IntegerTickSelector
public IntegerTickSelector()Creates a new instance.
-
-
Method Details
-
select
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, thegetCurrentTickSize()
method should return the selected tick size (there is a "pointer" to this tick size), thenext()
method should move the pointer to the next (larger) standard tick size, and theprevious()
method should move the pointer to the previous (smaller) standard tick size.- Specified by:
select
in interfaceTickSelector
- Parameters:
reference
- the reference value (must be positive and finite).- Returns:
- The selected tick size.
-
next
Move the cursor to the next (larger) tick size, if there is one. Returnstrue
in the case that the cursor is moved, andfalse
where there are a finite number of tick sizes and the current tick size is the largest available.- Specified by:
next
in interfaceTickSelector
- Returns:
- A boolean.
-
previous
Move the cursor to the previous (smaller) tick size, if there is one. Returnstrue
in the case that the cursor is moved, andfalse
where there are a finite number of tick sizes and the current tick size is the smallest available.- Specified by:
previous
in interfaceTickSelector
- Returns:
- A boolean.
-
getCurrentTickSize
Description copied from interface:TickSelector
Returns the tick size that the cursor is currently referencing.- Specified by:
getCurrentTickSize
in interfaceTickSelector
- 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 interfaceTickSelector
- Returns:
- The formatter.
-
equals
Tests this instance for equality with an arbitrary object.
-