|
|||||||||
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
public class WorkingCoordinates
This class maps a working coordinate system onto the world coordinate system of the underlying WorldCoordinates object. All coordinates are specified in world coordinates.
Field Summary |
---|
Constructor Summary | |
---|---|
WorkingCoordinates()
The default WorkingCoordinates constructor. |
|
WorkingCoordinates(double rX1,
double rY1,
double rX2,
double rY2)
This constructor creates a new WorkingCoordinates object using the specified minimum and maximum values for the x- and y-axis. |
Method Summary | |
---|---|
void |
calcWorkingScale(ChartRectangle2D plotareascale)
This method defines the bounds of the working coordinate system, extending the working coordinate system defined for the plotting area to the entire graph area. |
java.lang.Object |
clone()
Returns an object that is a clone of this WorkingCoordinates object. |
void |
copy(WorkingCoordinates source)
Copies the source scale. |
int |
errorCheck(int nerror)
Checks the WorkingCoordinates object for common errors. |
int |
getClippingArea()
This method returns True if clipping to the plot area is currently on. |
ChartRectangle2D |
getGraphAreaScale()
Returns the working scale coordinates of the graph area. |
double |
getGraphAspectRatio()
This method returns the aspect ratio (H/W) of the graph area. |
ChartRectangle2D |
getGraphBorderFrame()
This method returns the position and size of the plot area inside the graph area, specified using graph normalized coordinates. |
ChartRectangle2D |
getGraphRect()
This method returns the bounds of the graph area in window device coordinates. |
ChartRectangle2D |
getPlotAreaScale()
Returns the working scale coordinates of the plot area. |
ChartRectangle2D |
getPlotRect()
Calculates and returns the bounds of the plot area clipping rectangle using window device coordinates. |
double |
getWorkingRangeX()
This method returns the range of the current working scale of the graph area for the x-dimension. |
double |
getWorkingRangeY()
This method returns the range of the current working scale of the graph area for the y-dimension. |
void |
setClippingArea(int cliparea)
Sets the clipping mode. |
void |
setFixedGraphBorderInset(int border,
double bordervalue,
boolean enable)
This method initializes the inset of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setFixedGraphBorderInsets(double rLeft,
double rTop,
double rRight,
double rBottom,
boolean leftEnable,
boolean topEnable,
boolean rightEnable,
boolean bottomEnable)
This method initializes the inset of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setGraphBorderDiagonal(double rLeft,
double rTop,
double rRight,
double rBottom)
This method initializes the position and size of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setGraphBorderFrame(ChartRectangle2D border)
This method initializes the position and size of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setGraphBorderFrame(double rLeft,
double rTop,
double width,
double height)
This method initializes the position and size of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setGraphBorderInsets(double rLeft,
double rTop,
double rRight,
double rBottom)
This method initializes the inset of the plot area inside the graph area, specified using graph normalized coordinates. |
void |
setPlotAreaScale(ChartRectangle2D rect)
Sets the coordinates of the plot area. |
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 WorkingCoordinates()
public WorkingCoordinates(double rX1, double rY1, double rX2, double rY2)
rX1
- Sets the lower left x-value for the plotting area working coordinate system.rY1
- Sets the lower left y-value for the plotting area working coordinate system.rX2
- Sets the upper right x-value for the plotting area working coordinate system.rY2
- Sets the upper right y-value for the plotting area working coordinate system.Method Detail |
---|
public void calcWorkingScale(ChartRectangle2D plotareascale)
plotareascale
- Specifies the coordinate values of the plot area.public java.lang.Object clone()
clone
in class UserCoordinates
public void copy(WorkingCoordinates source)
source
- The source scale object.public int errorCheck(int nerror)
errorCheck
in class WorldCoordinates
nerror
- Current error state
public int getClippingArea()
public ChartRectangle2D getGraphAreaScale()
public double getGraphAspectRatio()
public ChartRectangle2D getGraphBorderFrame()
public ChartRectangle2D getGraphRect()
public ChartRectangle2D getPlotAreaScale()
public ChartRectangle2D getPlotRect()
public double getWorkingRangeX()
public double getWorkingRangeY()
public void setClippingArea(int cliparea)
cliparea
- Use one of the cliparea constants: NO_CLIPPING,GRAPH_AREA_CLIPPING,
PLOT_AREA_CLIPPING, or INHERIT_CLIPPING.public void setFixedGraphBorderInset(int border, double bordervalue, boolean enable)
border
- Set the value of this border for the plotting area. User one of the
border constants: LEFT_BORDER, TOP_BORDER, RIGHT_BORDER, BOTTOM_BORDER.bordervalue
- The left inset of the plotting area inside the graph area specified using graph
normalized coordinates.enable
- Enable this border for fixed borders.public void setFixedGraphBorderInsets(double rLeft, double rTop, double rRight, double rBottom, boolean leftEnable, boolean topEnable, boolean rightEnable, boolean bottomEnable)
rLeft
- The left inset of the plotting area inside the graph area specified using graph
normalized coordinates.rTop
- The top inset of the plotting area inside the graph area specified using graph
normalized coordinates.rRight
- The right inset of the plotting area inside the graph area specified using graph
normalized coordinates.rBottom
- The bottom inset of the plotting area inside the graph area specified using graph
normalized coordinates.leftEnable
- Use a fixed pixel border for this side.topEnable
- Use a fixed pixel border for this side.rightEnable
- Use a fixed pixel border for this side.bottomEnable
- Use a fixed pixel border for this side.public void setGraphBorderDiagonal(double rLeft, double rTop, double rRight, double rBottom)
rLeft
- The left x-position of the plotting area inside the graph area specified using graph
normalized coordinates.rTop
- The top y-position of the plotting area inside the graph area specified using graph
normalized coordinates.rRight
- The right x-position of the plotting area inside the graph area specified using
graph normalized coordinates.rBottom
- The bottom y-position of the plotting area inside the graph area specified using
graph normalized coordinates.public void setGraphBorderFrame(ChartRectangle2D border)
border
- Specifies the rectangle defining the plot area border.public void setGraphBorderFrame(double rLeft, double rTop, double width, double height)
rLeft
- The left x-position of the plotting area inside the graph area specified using graph
normalized coordinates.rTop
- The top y-position of the plotting area inside the graph area specified using graph
normalized coordinates.width
- The width of the plotting area inside the graph area specified using graph normalized
coordinates.height
- The height of the plotting area inside the graph area specified using graph normalized
coordinates.public void setGraphBorderInsets(double rLeft, double rTop, double rRight, double rBottom)
rLeft
- The left inset of the plotting area inside the graph area specified using graph
normalized coordinates.rTop
- The top inset of the plotting area inside the graph area specified using graph
normalized coordinates.rRight
- The right inset of the plotting area inside the graph area specified using graph
normalized coordinates.rBottom
- The bottom inset of the plotting area inside the graph area specified using graph
normalized coordinates.public void setPlotAreaScale(ChartRectangle2D rect)
rect
- Sets the coordinates of the plot area.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |