|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.approximatrix.charting.coordsystem.ticklocator.NumericTickLocator
public class NumericTickLocator
Class for locating tick marks along axes. Designed for axes with numeric values.
| Field Summary | |
|---|---|
private int |
destics
|
private double |
max
|
private int |
maxtics
|
private double |
min
|
private boolean |
simple
|
private static int |
SIMPLE_TICK_THRESHOLD
The threshhold of specified tic mark counts at which the routines default to simple tick mark calculator |
private static int |
STOP_TICK_RECURSIONS
Count of recursions into the tick mark auto-placement routine at which to give up calculating placement |
private int |
tick_recursions
|
| Constructor Summary | |
|---|---|
NumericTickLocator(double max,
double min,
int numTicsDesired,
int maxTics)
Constructs a numeric tick locator based on maximum and minimum values. |
|
NumericTickLocator(double max,
double min,
int numTicsDesired,
int maxTics,
boolean force_simple)
Constructs a numeric tick locator based on maximum and minimum values. |
|
| Method Summary | |
|---|---|
private double[] |
computeTicMarkLocations(double max,
double min,
int numTicsDesired,
int maxTics,
boolean force_simple)
Simple wrapper routine that calls the appropriate tic mark locator routine. |
double[] |
getTickMarkLocations()
Computes and returns the tick mark locations |
private double[] |
performAutoScale(double max,
double min,
int numTicsDesired,
int maxTics)
Computes the tick mark locations on an axis |
private double[] |
simpleTics(double max,
double min,
int numTicsDesired)
Foolproof and simple method for determining Tic placement in cases where the tic count is low theoretically. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int SIMPLE_TICK_THRESHOLD
private static final int STOP_TICK_RECURSIONS
private double max
private double min
private int maxtics
private int destics
private boolean simple
private int tick_recursions
| Constructor Detail |
|---|
public NumericTickLocator(double max,
double min,
int numTicsDesired,
int maxTics)
max - the largest value to be plottedmin - the smallest value to be plottednumTicsDesired - the approximate desired number of tick marksmaxTics - the most allowed ticks
public NumericTickLocator(double max,
double min,
int numTicsDesired,
int maxTics,
boolean force_simple)
max - the largest value to be plottedmin - the smallest value to be plottednumTicsDesired - the approximate desired number of tick marksmaxTics - the most allowed ticksforce_simple - true to force the locator to create exactly numTicsDesired starting with min and ending with max| Method Detail |
|---|
public double[] getTickMarkLocations()
private double[] computeTicMarkLocations(double max,
double min,
int numTicsDesired,
int maxTics,
boolean force_simple)
max - the largest value to be plottedmin - the smallest value to be plottednumTicsDesired - the approximate desired number of tics (the result may not be this number of tics)maxTics - the absolute maximum number of tics to drawforce_simple - force the use of the simple algorithm for drawing tic marks
private double[] simpleTics(double max,
double min,
int numTicsDesired)
max - the largest value to be plottedmin - the smallest value to be plottednumTicsDesired - the exact number of tics desired
private double[] performAutoScale(double max,
double min,
int numTicsDesired,
int maxTics)
max - the largest value in a data setmin - the smallest value in a data setnumTicsDesired - the first guess at the number of desired tick marks
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||