|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart2djava.ChartObj
com.quinncurtis.chart2djava.AutoScale
com.quinncurtis.chart2djava.TimeAutoScale
public class TimeAutoScale
The TimeAutoScale is designed for use with time coordinates and is used to scale the plotting area of graphs and to set the minimum and maximum values of the axes displayed in the graphs.
Field Summary |
---|
Constructor Summary | |
---|---|
TimeAutoScale()
The default TimeAutoScale constructor. |
|
TimeAutoScale(TimeCoordinates transform,
java.util.GregorianCalendar dstart,
java.util.GregorianCalendar dstop,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on starting and ending calendar values. |
|
TimeAutoScale(TimeCoordinates transform,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on the initial scaling values of an TimeAutoScale object. |
|
TimeAutoScale(TimeCoordinates transform,
TimeGroupDataset[] datasets,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on the data values in an array of datasets. |
|
TimeAutoScale(TimeCoordinates transform,
TimeGroupDataset dataset,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on the data values in a dataset. |
|
TimeAutoScale(TimeCoordinates transform,
TimeSimpleDataset[] datasets,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on the data values in an array of datasets. |
|
TimeAutoScale(TimeCoordinates transform,
TimeSimpleDataset dataset,
int naxis,
int nmode)
This constructor creates a new TimeAutoScale object based on the data values in a dataset. |
|
TimeAutoScale(TimeScale timescale)
This constructor creates a new TimeAutoScale object based on the initial scaling values of an TimeScale object. |
Method Summary | |
---|---|
void |
adjustTimeAxisRange()
Round the endpoints of a time scale based on the current rounding mode and time super. |
void |
adjustTimeAxisRange(int ntimebase,
int nroundmode)
Round the endpoints of a time scale based on the rounding mode. |
java.util.GregorianCalendar |
adjustTimeLabelsOrigin(java.util.GregorianCalendar dstart,
int nroundmode,
int nround)
Round the label starting point of a time axis. |
void |
calcChartAutoScaleDataset()
Calculate new auto-scale values based on the values in the data set referenced by theDataset field. |
void |
calcChartAutoScaleDatasets()
Calculate new auto-scale values based on the values in the data sets referenced by the theDatasetsArray field. |
void |
calcChartAutoScaleInitialValues()
Calculate new auto-scale values based on the values in the chart scale referenced by theChartCoordinates field. |
void |
calcChartAutoScaleTransform()
Calculate new auto-scale values based on the values in the chart scale referenced by theChartCoordinates field. |
void |
calcRoundAxisValues(double raxmin,
double raxmax,
int nroundmode)
Round the endpoints of a time scale based on the rounding mode. |
void |
calcRoundTimeAxisValues(java.util.GregorianCalendar dmin,
java.util.GregorianCalendar dmax,
int nroundmode)
Round the endpoints of a time scale based on the rounding mode. |
void |
calcTimeBaseValues()
Calculates auto-scale parameters based on the starting and ending calendar dates. |
void |
calcTimeBaseValues(java.util.GregorianCalendar dmin,
java.util.GregorianCalendar dmax)
Calculates auto-scale parameters based on the starting and ending calendar dates. |
java.lang.Object |
clone()
Returns an object that is a clone of this TimeAutoScale object. |
void |
copy(TimeAutoScale source)
Copies the source TimeAutoScale object. |
int |
errorCheck(int nerror)
Checks the TimeAutoScale object for common errors. |
java.util.GregorianCalendar |
getDateStart()
Returns the starting date value for a time axis in the auto-scale setup. |
java.util.GregorianCalendar |
getDateStop()
Returns the ending date value for a time axis in the auto-scale setup. |
double |
getTickInterval()
Returns the calculated minor tick interval value of the auto-scale setup. |
java.util.GregorianCalendar |
getTimeLabelsOrigin()
Returns the starting value of labels and tick marks for a time axis in the auto-scale setup. |
int |
getTimeMajorNthTick()
Calculates and returns the majorNthTick field value for a time axis based on the current auto-axis setup. |
int |
getTimeMinorNthTick()
Calculates and returns the timeMinorNthTick field value for a time axis based on the current auto-axis setup. |
int |
getTimeScaleBase()
Calculates and returns the tick mark time base for a time axis based on the current auto-axis setup. |
void |
setTimeScale(TimeScale timescale)
Sets the time scale for the object. |
Methods inherited from class com.quinncurtis.chart2djava.AutoScale |
---|
adjustForZeroEndpoints, calcDatasetRange, calcDatasetsRange, calcFinalMax, calcFinalMin, calcNthTickMajor, calcOffset, calcTickInterval, copy, getAxisLabelsDecimalPos, getAxisMinorTicksPerMajor, getFinalMax, getFinalMin, getInitialMax, getInitialMin, getLabelsOrigin, getMaxRangeAdjust, getMinRangeAdjust, MaskDigits, setChartAutoScale, setChartAutoScale, setChartAutoScale, setChartAutoScale, setMaxRangeAdjust, setMinRangeAdjust, ShiftDecimalLeft, ShiftDecimalRight |
Methods inherited from class com.quinncurtis.chart2djava.ChartObj |
---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID, TypeSafeVectorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeAutoScale()
public TimeAutoScale(TimeCoordinates transform, java.util.GregorianCalendar dstart, java.util.GregorianCalendar dstop, int naxis, int nmode)
transform
- The auto-scale values are calculated based on the minimum and maximum
scaling values of this CartesianCoordinates object.dstart
- The start date.dstop
- The stop date.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTOAXES_EXACT).public TimeAutoScale(TimeCoordinates transform, int naxis, int nmode)
transform
- The auto-scale values are calculated based on the minimum and maximum
scaling values of this CartesianCoordinates object.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTOAXES_EXACT).public TimeAutoScale(TimeCoordinates transform, TimeGroupDataset[] datasets, int naxis, int nmode)
transform
- an TimeAutoScale object.datasets
- An array of datasets. The auto-scale values are calculated based on the minimum
and maximum values derived from these group datasets.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTO_EXACT).public TimeAutoScale(TimeCoordinates transform, TimeGroupDataset dataset, int naxis, int nmode)
transform
- an TimeAutoScale object.dataset
- The auto-scale values are calculated based on the minimum and maximum values
derived from this group dataset.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTO_EXACT).public TimeAutoScale(TimeCoordinates transform, TimeSimpleDataset[] datasets, int naxis, int nmode)
transform
- an TimeAutoScale object.datasets
- An array of datasets. The auto-scale values are calculated based on the minimum
and maximum values derived from these simple datasets.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTO_EXACT).public TimeAutoScale(TimeCoordinates transform, TimeSimpleDataset dataset, int naxis, int nmode)
transform
- an TimeAutoScale object.dataset
- The auto-scale values are calculated based on the minimum and maximum values
derived from this simple dataset.naxis
- The auto-scale values are calculated for this axis (X_AXIS or Y_AXIS).nmode
- The auto-scale values are calculated using this rounding mode (AUTOAXES_FAR,
AUTOAXES_NEAR, AUTO_EXACT).public TimeAutoScale(TimeScale timescale)
timescale
- The auto-scale values are calculated based on the minimum and maximum scaling
values of this TimeScale object.Method Detail |
---|
public void adjustTimeAxisRange()
public void adjustTimeAxisRange(int ntimebase, int nroundmode)
ntimebase
- The time base of the current time scale.nroundmode
- The auto-scale rounding mode (AUTOAXES_EXACT, AUTOAXES_NEAR, AUTOAXES_FAR).public java.util.GregorianCalendar adjustTimeLabelsOrigin(java.util.GregorianCalendar dstart, int nroundmode, int nround)
dstart
- The current auto-scale minimum.nroundmode
- The auto-scale rounding mode (AUTOAXES_EXACT, AUTOAXES_NEAR, AUTOAXES_FAR).nround
- The time base for major tick marks.
public void calcChartAutoScaleDataset()
calcChartAutoScaleDataset
in class AutoScale
public void calcChartAutoScaleDatasets()
calcChartAutoScaleDatasets
in class AutoScale
public void calcChartAutoScaleInitialValues()
calcChartAutoScaleInitialValues
in class AutoScale
public void calcChartAutoScaleTransform()
calcChartAutoScaleTransform
in class AutoScale
public void calcRoundAxisValues(double raxmin, double raxmax, int nroundmode)
calcRoundAxisValues
in class AutoScale
raxmin
- The current auto-scale minimum.raxmax
- The current auto-scale maximum.nroundmode
- The auto-scale rounding mode (AUTOAXES_EXACT, AUTOAXES_NEAR, AUTOAXES_FAR).public void calcRoundTimeAxisValues(java.util.GregorianCalendar dmin, java.util.GregorianCalendar dmax, int nroundmode)
dmin
- The current auto-scale minimum.dmax
- The current auto-scale maximum.nroundmode
- The auto-scale rounding mode (AUTOAXES_EXACT, AUTOAXES_NEAR, AUTOAXES_FAR).public void calcTimeBaseValues()
public void calcTimeBaseValues(java.util.GregorianCalendar dmin, java.util.GregorianCalendar dmax)
dmin
- The starting date for the scale.dmax
- The ending date for the scale.public java.lang.Object clone()
clone
in class java.lang.Object
public void copy(TimeAutoScale source)
source
- The source TimeAutoScale object.public int errorCheck(int nerror)
errorCheck
in class AutoScale
nerror
- Current error state
public java.util.GregorianCalendar getDateStart()
public java.util.GregorianCalendar getDateStop()
public double getTickInterval()
public java.util.GregorianCalendar getTimeLabelsOrigin()
public int getTimeMajorNthTick()
public int getTimeMinorNthTick()
public int getTimeScaleBase()
public void setTimeScale(TimeScale timescale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |