|
|||||||||
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
public abstract class PhysicalCoordinates
The PhysicalCoordinates class is the abstract base class for all physical coordinate systems used to plot objects in a graph. It uses installable scale objects for x- and y-coordinates scales, so that the x and y coordinate systems do not have to be the same.
Field Summary |
---|
Constructor Summary | |
---|---|
PhysicalCoordinates()
The default PhysicalCoordinates constructor. |
|
PhysicalCoordinates(ChartScale xscale,
ChartScale yscale)
This constructor creates a new PhysicalCoordinates object, specifying the ChartScale objects used to transform x- and y-values to/from physical to working coordinates. |
Method Summary | |
---|---|
abstract void |
autoScale(ChartDataset dataset)
This method initializes an TimeCoordinates object based on the range of x- and y-values in the supplied TimeSimpleDataset object. |
abstract void |
autoScale(ChartDataset[] datasets)
This method initializes an TimeCoordinates object based on the range of x- and y-values in an array of TimeSimpleDataset datasets. |
abstract void |
autoScale(ChartDataset[] datasets,
int nroundmodex,
int nroundmodey)
This method initializes an TimeCoordinates object based on the range of x- and y-values in an array of TimeSimpleDataset datasets. |
abstract void |
autoScale(ChartDataset dataset,
int nroundmodex,
int nroundmodey)
This method initializes an TimeCoordinates object based on the range of x- and y-values in the supplied TimeSimpleDataset object. |
abstract void |
autoScale(int nroundmodeX,
int nroundmodeY)
This abstract method auto-scales the current physical coordinates system, using the current physical coordinate values as the starting point. |
void |
chartTransform(java.awt.Graphics2D g2)
This method establishes a physical coordinate system for the current viewport, mapping the physical coordinate system to the viewport. |
abstract boolean |
checkValidPoint(double x,
double y)
This method checks the validity of the x- and y-values of a datapoint. |
void |
convertCoord(ChartPoint2D dest,
int ndestpostype,
ChartPoint2D source,
int nsrcpostype)
This method converts the coordinates of a point from one coordinate system to another. |
ChartPoint2D |
convertCoord(int ndestpostype,
ChartPoint2D source,
int nsrcpostype)
This method converts the coordinates of a point from one coordinate system to another. |
void |
convertCoordArray(ChartPoint2D[] dest,
int ndestpostype,
ChartPoint2D[] source,
int nsrcpostype,
int n)
This method converts an array of points from one coordinate system to another. |
void |
convertDimension(ChartDimension dest,
int ndestpostype,
ChartDimension source,
int nsrcpostype)
This method converts width and height dimensions from one coordinate system to another. |
ChartDimension |
convertDimension(int ndestpostype,
ChartDimension source,
int nsrcpostype)
This method converts width and height dimensions from one coordinate system to another. |
void |
convertRect(ChartRectangle2D dest,
int ndestpostype,
ChartRectangle2D source,
int nsrcpostype)
This method converts ChartRectangle2D object from one coordinate system to another. |
ChartRectangle2D |
convertRect(int ndestpostype,
ChartRectangle2D source,
int nsrcpostype)
This method converts ChartRectangle2D object from one coordinate system to another. |
abstract void |
copy(java.lang.Object source)
This abstract method copies the source scale. |
void |
copy(PhysicalCoordinates source)
Copies the source coordinate system. |
int |
errorCheck(int nerror)
Checks the current scale object for common errors. |
abstract Axis |
getCompatibleAxis(int axis)
This abstract method returns an axis compatible with the current physical coordinate system. |
ChartRectangle2D |
getPhysPlotScale()
This method returns the physical coordinates of the plotting area. |
double |
getScaleMaxX()
Get the maximum x-value for the plotting area of the physical coordinate system. |
double |
getScaleMaxY()
Get the maximum y-value for the plotting area of the physical coordinate system. |
double |
getScaleMinX()
Get the minimum x-value for the plotting area of the physical coordinate system. |
double |
getScaleMinY()
Get the minimum y-value for the plotting area of the physical coordinate system. |
double |
getScaleStartX()
This method returns the lower left x-value for the plotting area of the physical coordinate system. |
double |
getScaleStartY()
This method returns the lower left y-value for the plotting area of the physical coordinate system. |
double |
getScaleStopX()
This method returns the upper right x-value for the plotting area of the physical coordinate system. |
double |
getScaleStopY()
This method returns the upper right y-value for the plotting area of the physical coordinate system. |
double |
getStart(int naxis)
This method returns the lower left x- or y-value for the physical coordinate system of the plotting area. |
double |
getStartX()
This method returns the lower left x-value for the physical coordinate system of the plotting area. |
double |
getStartY()
This method returns the lower left y-value for the physical coordinate system of the plotting area. |
double |
getStop(int naxis)
This method returns the upper right x- or y-value for the physical coordinate system of the plotting area. |
double |
getStopX()
This method returns the upper right x-value for the physical coordinate system of the plotting area. |
double |
getStopY()
This method returns the upper right y-value for the physical coordinate system of the plotting area. |
double |
getStringX(java.awt.Graphics2D g2,
java.lang.String s,
int npostype)
This method returns the width of a string in the units of the specified coordinate system. |
double |
getStringY(java.awt.Graphics2D g2,
java.lang.String s,
int npostype)
This method returns the height of a string in the units of the specified coordinate system. |
java.awt.geom.Arc2D |
getWCircle(double x,
double y,
double radius)
This method converts a circle from physical coordinates to Java user coordinates. |
ChartScale |
getXScale()
This method returns the xScale scaling object, the ChartScale object used to transform x-values to/from physical to working coordinates. |
ChartScale |
getYScale()
This method returns the yScale scaling object, the ChartScale object used to transform y-values to/from physical to working coordinates. |
void |
invertScaleX()
This method swaps the minimum x-value of the coordinate system with the maximum x-value; the y-values of the coordinate system remain unchanged. |
void |
invertScaleY()
This method swaps the minimum y-value of the coordinate system with the maximum y-value; the x-values of the coordinate system remain unchanged. |
void |
normalizePoint(ChartPoint2D dest,
ChartPoint2D source,
int nmode)
This method converts the coordinates of a point from physical coordinates to normalized coordinates. |
ChartPoint2D |
normalizePoint(ChartPoint2D source,
int nmode)
This method converts the coordinates of a point from physical coordinates to normalized coordinates. |
ChartDimension |
normalizeRect(double w,
double h,
int nmode)
This method returns the normalized width and height of a rectangle, using the specified graph area physical coordinate system range. |
double |
physAddX(double x,
double increment)
This method adds an increment to the x-coordinate value in physical coordinates. |
double |
physAddY(double y,
double increment)
This method adds an increment to the y-coordinate value in physical coordinates. |
ChartPoint2D |
physToUser(ChartPoint2D source)
This method converts a point from physical coordinates to window device coordinates. |
void |
physToUser(ChartPoint2D dest,
ChartPoint2D source)
This method converts a point from physical coordinates to window device coordinates. |
double |
physToUserX(double x)
This method converts an x-coordinate value from physical coordinates to a window device coordinates. |
double |
physToUserY(double y)
This method converts an y-coordinate value from physical coordinates to window device coordinates. |
void |
physToWorkingScale(ChartPoint2D dest,
ChartPoint2D source)
This method converts a point from physical coordinates to working coordinates. |
double |
physToWorkingScale(int axis,
double v)
This method converts an x- or y-coordinate from physical coordinates to working coordinates. |
boolean |
scaleInverted(int axis)
It is possible for the x-scale, or the y-scale, or both, to be inverted. |
void |
segmentedPolyline(java.awt.Graphics2D g2,
int[] xarray,
int[] yarray,
int n)
This method converts the specified x- and y-arrays to device coordinates, and draws the resulting line as a polyline. |
void |
setCoordinateBounds(double rX1,
double rY1,
double rX2,
double rY2)
Sets the x- and y-coordinate bounds of the physical coordinate system for the plot area. |
void |
setPhysPlotScale(ChartRectangle2D physrect)
Sets the physical coordinates of the plotting area. |
void |
setPhysScale(ChartRectangle2D rect)
This method initializes an PhysicalCoordinates object using the specified minimum and maximum values for the x- and y-axis. |
void |
setPhysScale(double rX1,
double rY1,
double rX2,
double rY2)
This method initializes an PhysicalCoordinates object using the specified minimum and maximum values for the x- and y-axis. |
void |
setPhysScales(ChartScale xscale,
ChartScale yscale)
This method initializes an PhysicalCoordinates object, specifying the ChartScale objects used to transform x- and y-values to/from physical to working coordinates. |
void |
setScaleStartX(double rX1)
Sets the lower left x-value for the plotting area of the physical coordinate system. |
void |
setScaleStartY(double rY1)
Sets the lower left y-value for the plotting area of the physical coordinate system. |
void |
setScaleStopX(double rX2)
Sets the maximum x-value for the plotting area of the physical coordinate system. |
void |
setScaleStopY(double rY2)
Sets the upper right y-value for the plotting area of the physical coordinate system. |
void |
setScaleX(double rX1,
double rX2)
Sets the x-coordinate bounds of the physical coordinate system for the plot area. |
void |
setScaleY(double rY1,
double rY2)
Sets the y-coordinate bounds of the physical coordinate system for the plot area. |
void |
setXScale(ChartScale xscale)
This method initializes the xScale scaling object, specifying the ChartScale object used to transform x-values to/from physical to working coordinates. |
void |
setYScale(ChartScale yscale)
This method initializes the yScale scaling object, specifying the ChartScale object used to transform y-values to/from physical to working coordinates. |
void |
swapScaleOrientation()
This method swaps the minimum x-value of the coordinate system with the minimum y-value; and the maximum x-value with the maximum y-value. |
void |
unNormalizePoint(ChartPoint2D dest,
ChartPoint2D source,
int nmode)
This method converts the coordinates of a point from normalized coordinates to physical coordinates. |
ChartPoint2D |
unNormalizePoint(ChartPoint2D source,
int nmode)
This method converts the coordinates of a point from normalized coordinates to physical coordinates. |
void |
unNormalizeRect(ChartDimension dest,
double w,
double h,
int nmode)
This method converts a rectangles normalized width and height into physical coordinates. |
ChartDimension |
unNormalizeRect(double w,
double h,
int nmode)
This method converts a rectangles normalized width and height into physical coordinates. |
ChartPoint2D |
userToPhys(ChartPoint2D source)
This method converts a point from window device coordinates to physical coordinates. |
void |
userToPhys(ChartPoint2D dest,
ChartPoint2D source)
This method converts a point from window device coordinates to physical coordinates. |
double |
userToPhysX(double x)
This method converts an x-coordinate value from window device coordinates to physical coordinates. |
double |
userToPhysY(double y)
This method converts an y-coordinate value from window device coordinates to physical coordinates. |
void |
wCircle(java.awt.geom.GeneralPath path,
double x,
double y,
double radius)
This method adds a circle, defined using physical coordinates, to the specified path. |
void |
wLineAbs(java.awt.geom.GeneralPath path,
ChartPoint2D p1,
ChartPoint2D p2)
This method converts the specified starting and ending x- and y-coordinates to device coordinates, and adds a corresponding line segment to the specified path. |
void |
wLineAbs(java.awt.geom.GeneralPath path,
double x1,
double y1,
double x2,
double y2)
This method converts the specified starting and ending x- and y-coordinates to device coordinates, and adds a corresponding line segment to the specified path. |
void |
wLineAbs(java.awt.Graphics2D g2,
java.awt.geom.GeneralPath path,
double x1,
double y1,
double x2,
double y2,
boolean dodraw,
boolean appendpath)
This method converts the specified starting and ending x- and y-coordinates to device coordinates, and adds a corresponding line segment to the specified path. |
void |
wLineRel(java.awt.geom.GeneralPath path,
double deltax,
double deltay)
This method implements a relative lineto operation using physical coordinates. |
void |
wLineToAbs(java.awt.geom.GeneralPath path,
double x,
double y)
This method converts the specified x- and y-coordinates to device coordinates, and adds a corresponding lineto segment to the specified path. |
void |
wMoveToAbs(java.awt.geom.GeneralPath path,
double x,
double y)
This method converts the specified x- and y-coordinates to device coordinates, and adds a corresponding move segment to the specified path. |
void |
workingToPhysScale(ChartPoint2D dest,
ChartPoint2D source)
This method converts a point from working coordinates to physical coordinates. |
double |
workingToPhysScale(int axis,
double v)
This method converts an x- or y-coordinate from working coordinates to physical coordinates. |
void |
wPolyLineAbs(java.awt.geom.GeneralPath path,
ChartPoint2D[] p,
int numdat,
int stepmode)
This method adds multiple line segments, defined using physical coordinates, to the specified path. |
void |
wPolyLineAbs(java.awt.geom.GeneralPath path,
double[] x,
double[] y,
int numdat,
int stepmode)
This method adds multiple line segments, defined using physical coordinates, to the specified path. |
void |
wPolyLineAbs(java.awt.geom.GeneralPath path,
DoubleArray x,
DoubleArray y,
int stepmode)
This method converts the specified x- and y-arrays to device coordinates, and draws the resulting line as a polyline. |
void |
wPolyLineAbs(java.awt.Graphics2D g2,
double[] x,
double[] y,
int n,
int stepmode)
This method converts the specified x- and y-arrays to device coordinates, and draws the resulting line as a polyline. |
void |
wPolyLineAbs(java.awt.Graphics2D g2,
DoubleArray x,
DoubleArray y,
int stepmode)
This method converts the specified x- and y-arrays to device coordinates, and draws the resulting line as a polyline. |
void |
wRectangle(java.awt.geom.GeneralPath path,
double x1,
double y1,
double w,
double h)
This method adds a rectangle, defined using physical coordinates, to the specified path. |
void |
wRoundedRectangle(java.awt.geom.GeneralPath path,
double x1,
double y1,
double w,
double h,
double corner)
This method adds a rectangle, defined using physical coordinates, to the specified path. |
void |
wStepLineAbs(java.awt.geom.GeneralPath path,
ChartPoint2D p1,
ChartPoint2D p2,
int stepmode)
This method converts the specified x- and y-coordinates to device coordinates, and adds corresponding lineto segments to the specified path. |
void |
wStepLineAbs(java.awt.geom.GeneralPath path,
double x1,
double y1,
double x2,
double y2,
int stepmode)
This method converts the specified x- and y-coordinates to device coordinates, and adds corresponding lineto segments to the specified path. |
void |
wStepLineToAbs(java.awt.geom.GeneralPath path,
ChartPoint2D p1,
int stepmode)
This method converts the specified x- and y-coordinates to device coordinates, and adds corresponding lineto segments to the specified path. |
void |
wStepLineToAbs(java.awt.geom.GeneralPath path,
double x2,
double y2,
int stepmode)
This method converts the specified x- and y-coordinates to device coordinates, and adds corresponding lineto segments to the specified path. |
Methods inherited from class com.quinncurtis.chart2djava.WorkingCoordinates |
---|
calcWorkingScale, clone, 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 PhysicalCoordinates()
public PhysicalCoordinates(ChartScale xscale, ChartScale yscale)
xscale
- Sets the ChartScale object used to transform x-values to/from physical to working coordinates.yscale
- Sets the ChartScale object used to transform y-values to/from physical to working coordinates.Method Detail |
---|
public abstract void autoScale(ChartDataset dataset)
dataset
- The TimeSimpleDataset dataset used as the basis for the new coordinate system.public abstract void autoScale(ChartDataset[] datasets)
datasets
- The array of dataset used as the basis for the new coordinate system.public abstract void autoScale(ChartDataset[] datasets, int nroundmodex, int nroundmodey)
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 abstract void autoScale(ChartDataset dataset, int nroundmodex, int nroundmodey)
dataset
- The TimeSimpleDataset 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 abstract void autoScale(int nroundmodeX, int nroundmodeY)
nroundmodeX
- The x-coordinate values are calculated using this rounding mode
(AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT).nroundmodeY
- The y-coordinate values are calculated using this rounding mode
(AUTOAXES_FAR,AUTOAXES_NEAR,AUTOAXES_EXACT).public void chartTransform(java.awt.Graphics2D g2)
g2
- The graphics context.public abstract boolean checkValidPoint(double x, double y)
x
- The x-value of the datapoint that is checked.y
- The y-value of the datapoint that is checked.
public void convertCoord(ChartPoint2D dest, int ndestpostype, ChartPoint2D source, int nsrcpostype)
dest
- Returns the converted coordinate value as a ChartPoint2D object.ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate
system constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The coordinates of a the point that is to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;public ChartPoint2D convertCoord(int ndestpostype, ChartPoint2D source, int nsrcpostype)
ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The coordinates of a the point that is to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;
public void convertCoordArray(ChartPoint2D[] dest, int ndestpostype, ChartPoint2D[] source, int nsrcpostype, int n)
dest
- An array of ChartPoint2D objects, of size n, that returns the converted coordinate values.ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate
system constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- An array of ChartPoint2D, of size n, that holds the points that are to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;n
- The number of points in source and destination arrays.public void convertDimension(ChartDimension dest, int ndestpostype, ChartDimension source, int nsrcpostype)
dest
- Returns the converted dimension values as an ChartDimension object.ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The width and height values that are to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;public ChartDimension convertDimension(int ndestpostype, ChartDimension source, int nsrcpostype)
ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate
system constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The width and height values that are to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;
public void convertRect(ChartRectangle2D dest, int ndestpostype, ChartRectangle2D source, int nsrcpostype)
dest
- Returns the converted ChartRectangle2D values.ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate
system constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The source ChartRectangle2D object that is to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;public ChartRectangle2D convertRect(int ndestpostype, ChartRectangle2D source, int nsrcpostype)
ndestpostype
- Specifies the destination coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;source
- The source ChartRectangle2D object that is to be converted.nsrcpostype
- Specifies the source coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, POLAR_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;
public abstract void copy(java.lang.Object source)
source
- The source scale object.public void copy(PhysicalCoordinates source)
source
- The source scale object.public int errorCheck(int nerror)
errorCheck
in class WorkingCoordinates
nerror
- Current error state
public abstract Axis getCompatibleAxis(int axis)
public ChartRectangle2D getPhysPlotScale()
public double getScaleMaxX()
public double getScaleMaxY()
public double getScaleMinX()
public double getScaleMinY()
public double getScaleStartX()
public double getScaleStartY()
public double getScaleStopX()
public double getScaleStopY()
public double getStart(int naxis)
naxis
- SpecifyX_AXIS for the lower left x-value, orY_AXIS for the lower left y-value.
public double getStartX()
public double getStartY()
public double getStop(int naxis)
naxis
- SpecifyX_AXIS for the upper right x-value, orY_AXIS for the upper right y-value.
public double getStopX()
public double getStopY()
public double getStringX(java.awt.Graphics2D g2, java.lang.String s, int npostype)
g2
- The graphics context.s
- The string the width is calculated for.npostype
- Specifies the coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;
public double getStringY(java.awt.Graphics2D g2, java.lang.String s, int npostype)
g2
- The graphics context.s
- The string the height is calculated for.npostype
- Specifies the coordinate system. Use one of the coordinate system
constants:DEV_POS,PHYS_POS, NORM_GRAPH_POS, or NORM_PLOT_POS;
public java.awt.geom.Arc2D getWCircle(double x, double y, double radius)
x
- A x-coordinate value in physical coordinates representing the circle center.y
- A y-coordinate value in physical coordinates representing the circle center.radius
- The radius of the circle in physical coordinates.public ChartScale getXScale()
public ChartScale getYScale()
public void invertScaleX()
public void invertScaleY()
public void normalizePoint(ChartPoint2D dest, ChartPoint2D source, int nmode)
dest
- Returns the coordinates of the point in normalized coordinates.source
- The coordinates of a point specified using physical coordinates.nmode
- Use the constant NORM_GRAPH_POS if the point is to be normalized using the graph
area, or NORM_PLOT_POS if the point is to be normalized using the plot area.public ChartPoint2D normalizePoint(ChartPoint2D source, int nmode)
source
- The coordinates of a point specified using physical coordinates.nmode
- Use the constant NORM_GRAPH_POS if the point is to be normalized using the
graph area, or NORM_PLOT_POS if the point is to be normalized using the plot area.
public ChartDimension normalizeRect(double w, double h, int nmode)
w
- The width of the rectangle in physical coordinates.h
- The height of the rectangle in physical coordinates.nmode
- Use the constant NORM_GRAPH_POS if the rectangle is to be normalized using the
graph area, or NORM_PLOT_POS if the rectangle is to be normalized using the plot area.
public double physAddX(double x, double increment)
x
- The x-coordinate value that is incremented.increment
- The increment value.
public double physAddY(double y, double increment)
y
- The y-coordinate value that is incremented.increment
- The increment value.
public ChartPoint2D physToUser(ChartPoint2D source)
source
- The physical coordinates that are converted to window device coordinates.
public void physToUser(ChartPoint2D dest, ChartPoint2D source)
source
- The physical coordinates that are converted to window device coordinates.dest
- Returns the point converted to window device coordinates .public double physToUserX(double x)
x
- The physical x-coordinate value that is converted to window device coordinates.
public double physToUserY(double y)
y
- The physical y-coordinate value that is converted to window device coordinates.
public void physToWorkingScale(ChartPoint2D dest, ChartPoint2D source)
dest
- Returns the value of the point in working coordinates.source
- Specifies the value of the point in physical coordinates.public double physToWorkingScale(int axis, double v)
axis
- Specifies if the value being converted is an x-coordinate or y-coordinate. Use
either theX_AXIS orY_AXIS constant.v
- The coordinate value that is converted from physical coordinates to working coordinates.
public boolean scaleInverted(int axis)
axis
- Specifies which coordinate to check.
public void segmentedPolyline(java.awt.Graphics2D g2, int[] xarray, int[] yarray, int n)
g2
- The graphics contextxarray
- An array of x-values of the polyline path.yarray
- An array of y-values of the polyline path.n
- The number of points in the x and y arrays.public void setCoordinateBounds(double rX1, double rY1, double rX2, double rY2)
rX1
- Sets the lower left x-value for the plotting area of the physical coordinate system.rX2
- Sets the upper right x-value for the plotting area of the physical coordinate system.rY1
- Sets the lower left y-value for the plotting area of the physical coordinate system.rY2
- Sets the upper right y-value for the plotting area of the physical coordinate system.public void setPhysPlotScale(ChartRectangle2D physrect)
physrect
- Sets the physical coordinates of the plotting area.public void setPhysScale(ChartRectangle2D rect)
rect
- Sets the minimum and maximum x- and y-values. The ChartRectangle2D object actually holds
the minimum x- and y-values, and the width and height of the scale. The width and height values are added to the minimum x- and y-values in order to set the maximum x- and y-values.public void setPhysScale(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 void setPhysScales(ChartScale xscale, ChartScale yscale)
xscale
- Sets the ChartScale object used to transform x-values to/from physical to working coordinates.yscale
- Sets the ChartScale object used to transform y-values to/from physical to working coordinates.public void setScaleStartX(double rX1)
rX1
- Sets the lower left x-value for the plotting area of the physical coordinate system.public void setScaleStartY(double rY1)
rY1
- Sets the lower left y-value for the plotting area of the physical coordinate system.public void setScaleStopX(double rX2)
rX2
- Sets the upper right x-value for the plotting area of the physical coordinate system.public void setScaleStopY(double rY2)
rY2
- Sets the upper right y-value for the plotting area of the physical coordinate system.public void setScaleX(double rX1, double rX2)
rX1
- Sets the lower left x-value for the plotting area of the physical coordinate system.rX2
- Sets the upper right x-value for the plotting area of the physical coordinate system.public void setScaleY(double rY1, double rY2)
rY1
- Sets the lower left y-value for the plotting area of the physical coordinate system.rY2
- Sets the upper right y-value for the plotting area of the physical coordinate system.public void setXScale(ChartScale xscale)
xscale
- Sets the ChartScale object used to transform x-values to/from physical to working coordinates.public void setYScale(ChartScale yscale)
yscale
- Sets the ChartScale object used to transform y-values to/from physical to working coordinates.public void swapScaleOrientation()
public void unNormalizePoint(ChartPoint2D dest, ChartPoint2D source, int nmode)
dest
- Returns the coordinates of the point in physical coordinates.source
- The coordinates of a point specified using normalized coordinates.nmode
- Use the constant NORM_GRAPH_POS if the point is specified using graph area
normalized coordinates, or NORM_PLOT_POS if the point is specified using plot area normalized coordinates.public ChartPoint2D unNormalizePoint(ChartPoint2D source, int nmode)
source
- The coordinates of a point specified using normalized coordinates.nmode
- Use the constant NORM_GRAPH_POS if the point is specified using graph area
normalized coordinates, or NORM_PLOT_POS if the point is specified using plot area normalized coordinates.
public void unNormalizeRect(ChartDimension dest, double w, double h, int nmode)
dest
- Returns the width and height of the rectangle in an ChartDimension object.w
- The width of the rectangle in normalized coordinates.h
- The height of the rectangle in normalized coordinates.nmode
- Use the constant NORM_GRAPH_POS if the rectangle is specified using graph area
normalized coordinates, or NORM_PLOT_POS if the rectangle is specified using plot area normalized coordinates.public ChartDimension unNormalizeRect(double w, double h, int nmode)
w
- The width of the rectangle in normalized coordinates.h
- The height of the rectangle in normalized coordinates.nmode
- Use the constant NORM_GRAPH_POS if the rectangle is specified using graph area
normalized coordinates, or NORM_PLOT_POS if the rectangle is specified using plot area normalized coordinates.
public ChartPoint2D userToPhys(ChartPoint2D source)
source
- The window device coordinates that are converted to physical coordinates.
public void userToPhys(ChartPoint2D dest, ChartPoint2D source)
source
- The window device coordinates that are converted to physical coordinates.dest
- Returns the point converted to physical coordinates .public double userToPhysX(double x)
x
- The physical x-coordinate value that is converted to physical coordinates.
public double userToPhysY(double y)
y
- The physical y-coordinate value that is converted to physical coordinates.
public void wCircle(java.awt.geom.GeneralPath path, double x, double y, double radius)
path
- A general path object.x
- A x-coordinate value in physical coordinates representing the circle center.y
- A y-coordinate value in physical coordinates representing the circle center.radius
- The radius of the circle in physical coordinates.public void wLineAbs(java.awt.geom.GeneralPath path, ChartPoint2D p1, ChartPoint2D p2)
path
- A general path object.p1
- The starting coordinate values in physical coordinates.p2
- The ending coordinate values in physical coordinates.public void wLineAbs(java.awt.geom.GeneralPath path, double x1, double y1, double x2, double y2)
path
- A general path object.x1
- The starting x-coordinate value in physical coordinates.y1
- The starting y-coordinate value in physical coordinates.x2
- The ending x-coordinate value in physical coordinates.y2
- The ending y-coordinate value in physical coordinates.public void wLineAbs(java.awt.Graphics2D g2, java.awt.geom.GeneralPath path, double x1, double y1, double x2, double y2, boolean dodraw, boolean appendpath)
g2
- The graphics context.path
- A general path object.x1
- The starting x-coordinate value in physical coordinates.y1
- The starting y-coordinate value in physical coordinates.x2
- The ending x-coordinate value in physical coordinates.y2
- The ending y-coordinate value in physical coordinates.dodraw
- Draw the line segment immediately if true.appendpath
- Append the line segment to the path.public void wLineRel(java.awt.geom.GeneralPath path, double deltax, double deltay)
path
- A general path object.deltax
- An x-coordinate value in physical coordinates.deltay
- A y-coordinate value in physical coordinates.public void wLineToAbs(java.awt.geom.GeneralPath path, double x, double y)
path
- A general path object.x
- A x-coordinate value in physical coordinates.y
- A y-coordinate value in physical coordinates.public void wMoveToAbs(java.awt.geom.GeneralPath path, double x, double y)
path
- A general path object.x
- A x-coordinate value in physical coordinates.y
- A y-coordinate value in physical coordinates.public void workingToPhysScale(ChartPoint2D dest, ChartPoint2D source)
dest
- Returns the value of the point in physical coordinates.source
- Specifies the value of the point in working coordinates.public double workingToPhysScale(int axis, double v)
axis
- Specifies if the value being converted is an x-coordinate or y-coordinate. Use
either theX_AXIS orY_AXIS constant.v
- The coordinate value that is converted from working coordinates to physical coordinates.
public void wPolyLineAbs(java.awt.geom.GeneralPath path, ChartPoint2D[] p, int numdat, int stepmode)
path
- The line segments are added to this path.p
- An array, size numdat, of world coordinate points defining the endpoints of the line segmentsnumdat
- The starting y-coordinate value of the line segment.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wPolyLineAbs(java.awt.geom.GeneralPath path, double[] x, double[] y, int numdat, int stepmode)
path
- The line segments are added to this path.x
- An array, size numdat, of x-values defining the endpoints of the line segments
that are added to the specified path.y
- An array, size numdat, of y-values defining the endpoints of the line segments
that are added to the specified path.numdat
- The starting y-coordinate value of the line segment.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wPolyLineAbs(java.awt.geom.GeneralPath path, DoubleArray x, DoubleArray y, int stepmode)
path
- A general path object.x
- A DoubleArray array of the x-values of the polygon path.y
- A DoubleArray array of the y-values of the polygon path.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wPolyLineAbs(java.awt.Graphics2D g2, double[] x, double[] y, int n, int stepmode)
g2
- A graphics context.x
- A DoubleArray array of the x-values of the polygon path.y
- A DoubleArray array of the y-values of the polygon path.n
- The number of data points in the x and y arrays.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wPolyLineAbs(java.awt.Graphics2D g2, DoubleArray x, DoubleArray y, int stepmode)
g2
- A graphics context.x
- A DoubleArray array of the x-values of the polygon path.y
- A DoubleArray array of the y-values of the polygon path.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wRectangle(java.awt.geom.GeneralPath path, double x1, double y1, double w, double h)
path
- A general path object.x1
- A x-coordinate value in physical coordinates representing the lower left
corner of the rectangle.y1
- A y-coordinate value in physical coordinates rep resending the lower left
corner of the rectangle.w
- The width of the rectangle in physical coordinates.h
- The height of the rectangle in physical coordinates.public void wRoundedRectangle(java.awt.geom.GeneralPath path, double x1, double y1, double w, double h, double corner)
path
- A general path object.x1
- A x-coordinate value in physical coordinates representing the lower left
corner of the rectangle.y1
- A y-coordinate value in physical coordinates rep resending the lower left
corner of the rectangle.w
- The width of the rectangle in physical coordinates.h
- The height of the rectangle in physical coordinates.corner
- The corner radius of the rounded rectangle.public void wStepLineAbs(java.awt.geom.GeneralPath path, ChartPoint2D p1, ChartPoint2D p2, int stepmode)
path
- A general path object.p1
- The starting coordinate values in physical coordinates.p2
- The ending coordinate values in physical coordinates.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wStepLineAbs(java.awt.geom.GeneralPath path, double x1, double y1, double x2, double y2, int stepmode)
path
- A general path object.x1
- The starting x-coordinate value in physical coordinates.y1
- The starting y-coordinate value in physical coordinates.x2
- The ending x-coordinate value in physical coordinates.y2
- The ending y-coordinate value in physical coordinates.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wStepLineToAbs(java.awt.geom.GeneralPath path, ChartPoint2D p1, int stepmode)
path
- A general path object.p1
- A point in physical coordinates.stepmode
- The step mode for the connection line(s). Use one of the step line constants:
NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.public void wStepLineToAbs(java.awt.geom.GeneralPath path, double x2, double y2, int stepmode)
path
- A general path object.x2
- A x-coordinate value in physical coordinates.y2
- A y-coordinate value in physical coordinates.stepmode
- The step mode for the connection line(s). Use one of the step line
constants: NO_STEP, STEP_START, STEP_END or STEP_NO_RISE_LINE.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |