|
|||||||||
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.UserCoordinates
com.quinncurtis.chart2djava.WorldCoordinates
com.quinncurtis.chart2djava.WorkingCoordinates
com.quinncurtis.chart2djava.PhysicalCoordinates
com.quinncurtis.chart2djava.CartesianCoordinates
public class CartesianCoordinates
The CartesianCoordinates class extends the PhysicalCoordinates class to support linear-linear, linear-log, log-linear and log-log coordinate systems in an xy coordinate plane.
Field Summary |
---|
Constructor Summary | |
---|---|
CartesianCoordinates()
The default CartesianCoordinates constructor. |
|
CartesianCoordinates(double rX1,
double rY1,
double rX2,
double rY2)
This constructor creates a new CartesianCoordinates object using the specified minimum and maximum values for the x- and y-coordinate systems. |
|
CartesianCoordinates(int xscale,
int yscale)
This constructor creates a new CartesianCoordinates object, specifying either a linear or a logarithmic scale for both x- and y-coordinates. |
Method Summary | |
---|---|
void |
autoScale(ChartDataset dataset)
This method initializes an CartesianCoordinates object based on the range of x- and y-values in the supplied dataset. |
void |
autoScale(ChartDataset[] datasets)
This method initializes an CartesianCoordinates object based on the range of x- and y-values in an array of datasets. |
void |
autoScale(ChartDataset[] datasets,
int nroundmodeX,
int nroundmodeY)
This method initializes an CartesianCoordinates object based on the range of x- and y-values in an array of datasets. |
void |
autoScale(ChartDataset dataset,
int nroundmodeX,
int nroundmodeY)
This method initializes an CartesianCoordinates object based on the range of x- and y-values in the supplied dataset. |
void |
autoScale(int nroundmodeX,
int nroundmodeY)
This method initializes an CartesianCoordinates object, running the auto-axis algorithm on the current minimum and maximum scaling values. |
boolean |
checkValidPoint(double x,
double y)
This method checks the validity of the x- and y-values of a data point. |
java.lang.Object |
clone()
Returns an object that is a clone of this CartesianCoordinates object. |
void |
copy(CartesianCoordinates source)
Copies the source scale. |
void |
copy(java.lang.Object source)
Copies the source scale. |
int |
errorCheck(int nerror)
Checks the current scale object for common errors. |
Axis |
getCompatibleAxis(int axis)
This method returns either a linear or a logarithmic axis object, compatible with the specified coordinate system (x or y). |
void |
setCartesianScaleTransforms(int xscale,
int yscale)
This method specifies either a linear or a logarithmic scale for both x- and y-coordinates. |
void |
setCartesianXScaleTransform(int xscale)
Sets the x-coordinate system to either linear or logarithmic. |
void |
setCartesianYScaleTransform(int yscale)
Sets the y-coordinate system to either linear or logarithmic. |
Methods inherited from class com.quinncurtis.chart2djava.WorkingCoordinates |
---|
calcWorkingScale, copy, getClippingArea, getGraphAreaScale, getGraphAspectRatio, getGraphBorderFrame, getGraphRect, getPlotAreaScale, getPlotRect, getWorkingRangeX, getWorkingRangeY, setClippingArea, setFixedGraphBorderInset, setFixedGraphBorderInsets, setGraphBorderDiagonal, setGraphBorderFrame, setGraphBorderFrame, setGraphBorderInsets, setPlotAreaScale |
Methods inherited from class com.quinncurtis.chart2djava.WorldCoordinates |
---|
copy, getWorldCurrentPos, getWorldX1, getWorldX2, getWorldY1, getWorldY2, setWorldScale, setWorldScale, userToWorld, userToWorld, userToWorld, userToWorld, userToWorldAbsX, userToWorldAbsY, userToWorldRelX, userToWorldRelY, worldToUser, worldToUser, worldToUser, worldToUserAbsX, worldToUserAbsY, worldToUserRelX, worldToUserRelY |
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 CartesianCoordinates()
public CartesianCoordinates(double rX1, double rY1, double rX2, double rY2)
rX1
- Sets the lower left x-value for the plotting area physical coordinate system.rY1
- Sets the lower left y-value for the plotting area physical coordinate system.rX2
- Sets the upper right x-value for the plotting area physical coordinate system.rY2
- Sets the upper right y-value for the plotting area physical coordinate system.public CartesianCoordinates(int xscale, int yscale)
xscale
- Sets the x-coordinate system to either linear or logarithmic scaling. Use one of the
scaling constants: LINEAR_SCALE or LOG_SCALE.yscale
- Sets the y-coordinate system to either linear or logarithmic scaling. Use one of the
scaling constants: LINEAR_SCALE or LOG_SCALE.Method Detail |
---|
public void autoScale(ChartDataset dataset)
autoScale
in class PhysicalCoordinates
dataset
- The dataset used as the basis for the new coordinate system.public void autoScale(ChartDataset[] datasets)
autoScale
in class PhysicalCoordinates
datasets
- The datasets array.public void autoScale(ChartDataset[] datasets, int nroundmodeX, int nroundmodeY)
autoScale
in class PhysicalCoordinates
datasets
- The array of dataset used as the basis for the new coordinate system.nroundmodeX
- Sets the auto-scale mode for the x-coordinate. Use one of the auto-scale
rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.nroundmodeY
- Sets the auto-scale mode for the y-coordinate. Use one of the auto-scale
rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.public void autoScale(ChartDataset dataset, int nroundmodeX, int nroundmodeY)
autoScale
in class PhysicalCoordinates
dataset
- The dataset used as the basis for the new coordinate system.nroundmodeX
- Sets the auto-scale mode for the x-coordinate. Use one of the auto-scale
rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.nroundmodeY
- Sets the auto-scale mode for the y-coordinate. Use one of the auto-scale
rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.public void autoScale(int nroundmodeX, int nroundmodeY)
autoScale
in class PhysicalCoordinates
nroundmodeX
- Sets the auto-scale mode for the x-coordinate. Use one of the
auto-scale rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.nroundmodeY
- Sets the auto-scale mode for the y-coordinate. Use one of the
auto-scale rounding mode constants:AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT.public boolean checkValidPoint(double x, double y)
checkValidPoint
in class PhysicalCoordinates
x
- The x-value of the data point that is checked.y
- The y-value of the data point that is checked.
public java.lang.Object clone()
clone
in class WorkingCoordinates
public void copy(CartesianCoordinates source)
source
- The source scale object.public void copy(java.lang.Object source)
copy
in class PhysicalCoordinates
source
- The source scale object.public int errorCheck(int nerror)
errorCheck
in class PhysicalCoordinates
nerror
- Current error state.
public Axis getCompatibleAxis(int axis)
getCompatibleAxis
in class PhysicalCoordinates
axis
- Specify the coordinate direction, either x or y, using one of the axis constants:
X_AXIS orY_AXIS.
public void setCartesianScaleTransforms(int xscale, int yscale)
xscale
- Sets the x-coordinate system to either linear or logarithmic scaling. Use one
of the scaling constants: LINEAR_SCALE or LOG_SCALE.yscale
- Sets the y-coordinate system to either linear or logarithmic scaling. Use one
of the scaling constants: LINEAR_SCALE or LOG_SCALE.public void setCartesianXScaleTransform(int xscale)
xscale
- Sets the x-coordinate system to either linear or logarithmic scaling. Use one of the
scaling constants: LINEAR_SCALE or LOG_SCALE.public void setCartesianYScaleTransform(int yscale)
yscale
- Sets the y-coordinate system to either linear or logarithmic scaling. Use one
of the scaling constants: LINEAR_SCALE or LOG_SCALE.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |