com.jrefinery.chart
Class SymbolicTickUnit

java.lang.Object
  |
  +--com.jrefinery.chart.TickUnit
        |
        +--com.jrefinery.chart.NumberTickUnit
              |
              +--com.jrefinery.chart.SymbolicTickUnit
All Implemented Interfaces:
java.lang.Comparable

public class SymbolicTickUnit
extends NumberTickUnit

A symbolic tick unit.

Author:
AB

Constructor Summary
SymbolicTickUnit(double size, java.lang.String[] sv)
          Creates a new symbolic tick unit.
 
Method Summary
 java.lang.String valueToString(double value)
          Converts a value to a string, using the list of symbolic values.
 
Methods inherited from class com.jrefinery.chart.TickUnit
compareTo, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymbolicTickUnit

public SymbolicTickUnit(double size,
                        java.lang.String[] sv)
Creates a new symbolic tick unit.
Parameters:
size - the size of the tick unit.
sv - the list of symbolic value to display instead of the numeric value.
Method Detail

valueToString

public java.lang.String valueToString(double value)
Converts a value to a string, using the list of symbolic values. ex: if the symbolic value list is ["up", "down"] then 0 is convert to "up" and 1 to "down".
Overrides:
valueToString in class NumberTickUnit
Parameters:
value - value to convert.
Returns:
the symbolic value.