com.approximatrix.charting.coordsystem.ticklocator
Class ObjectXTickLocator

java.lang.Object
  extended by com.approximatrix.charting.coordsystem.ticklocator.ObjectTickLocator
      extended by com.approximatrix.charting.coordsystem.ticklocator.ObjectXTickLocator

public class ObjectXTickLocator
extends ObjectTickLocator

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
ObjectXTickLocator(int first, int last, int maxTics)
          Pass-through constructor to construct the locator object based on the first and last index on the X axis of objects to be displayed.
ObjectXTickLocator(int first, int last, int maxTics, boolean forceAll)
          Pass-through constructor to construct the locator object based on the first and last index on the X axis of objects to be displayed.
 
Method Summary
 float[] getTickMarkLocationsAsPairs(int y)
          Returns an array of x,y pairs.
 
Methods inherited from class com.approximatrix.charting.coordsystem.ticklocator.ObjectTickLocator
getTickMarkLocations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectXTickLocator

public ObjectXTickLocator(int first,
                          int last,
                          int maxTics)
Pass-through constructor to construct the locator object based on the first and last index on the X axis of objects to be displayed. Constrains ticks to the maximum number.

Parameters:
first - the smallest index to allow
last - the largest index to allow
maxTics - the maximum number of ticks to display

ObjectXTickLocator

public ObjectXTickLocator(int first,
                          int last,
                          int maxTics,
                          boolean forceAll)
Pass-through constructor to construct the locator object based on the first and last index on the X axis of objects to be displayed. Constrains ticks to the maximum number. Setting forceAll allows all indices to be displayed.

Parameters:
first - the smallest index to allow
last - the largest index to allow
maxTics - the maximum number of ticks to display
forceAll - true to display all indices
Method Detail

getTickMarkLocationsAsPairs

public float[] getTickMarkLocationsAsPairs(int 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. Data is returned as floats for the AffineTransform, although only the integer is meaningful.

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