com.approximatrix.charting.coordsystem.ticklocator
Class NumericXTickLocator

java.lang.Object
  extended by com.approximatrix.charting.coordsystem.ticklocator.NumericTickLocator
      extended by com.approximatrix.charting.coordsystem.ticklocator.NumericXTickLocator

public class NumericXTickLocator
extends NumericTickLocator

Extended class to locate and return a transformable vector of x,y pairs for locating tick marks on an x axis (horizontal).

Author:
armstrong

Constructor Summary
NumericXTickLocator(double max, double min, int numTicsDesired, int maxTics)
          Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.
NumericXTickLocator(double max, double min, int numTicsDesired, int maxTics, boolean force_simple)
          Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.
 
Method Summary
 double[] getTickMarkLocationsAsPairs(double y)
          Returns an array of x,y pairs.
 
Methods inherited from class com.approximatrix.charting.coordsystem.ticklocator.NumericTickLocator
getTickMarkLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericXTickLocator

public NumericXTickLocator(double max,
                           double min,
                           int numTicsDesired,
                           int maxTics,
                           boolean force_simple)
Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values.

Parameters:
max - the largest value to be plotted
min - the smallest value to be plotted
numTicsDesired - the approximate desired number of tick marks
maxTics - the most allowed ticks
force_simple - true to force the locator to create exactly numTicsDesired starting with min and ending with max

NumericXTickLocator

public NumericXTickLocator(double max,
                           double min,
                           int numTicsDesired,
                           int maxTics)
Pass-through constructor to constructs a numeric tick locator based on maximum and minimum values. Allows one to specify using a simple locator, spacing ticks equally between max and min values.

Parameters:
max - the largest value to be plotted
min - the smallest value to be plotted
numTicsDesired - the approximate desired number of tick marks
maxTics - the most allowed ticks
Method Detail

getTickMarkLocationsAsPairs

public double[] getTickMarkLocationsAsPairs(double y)
Returns an array of x,y pairs. The x value contains an x tick location, while all the y values contain the passed value.

Parameters:
y - the value to use for y in the x,y pairs
Returns:
a vector of x,y pairs ready for use in an AffineTransform