|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.Grid
public class Grid
The Grid class manages and displays the grid lines for linear and logarithmic axes. It is a concrete subclass of the GraphObj class.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Grid()
The default Grid constructor. |
|
Grid(Axis axisref1,
Axis axisref2,
Axis axisref3,
int gridaxistype,
int gridtype)
This constructor creates a new Grid object based on the specified x-, y- and z-axes. |
|
Grid(Axis axisref1,
Axis axisref2,
int gridaxistype,
int gridtype)
This constructor creates a new Grid object based on the specified x- and y-axes. |
|
| Method Summary | |
|---|---|
boolean |
checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
Returns true if the test point is near one of the grid lines. |
java.lang.Object |
clone()
Returns an object that is a clone of this Grid object. |
void |
copy(Grid source)
Copies the source grid. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the current grid object for common errors. |
Axis |
getGridAxis(int axtype)
Returns the specified axis object of the grid. |
int |
getGridAxisType()
Returns grid axis type. |
int |
getGridType()
Returns the grid type. |
Axis |
getGridXAxis()
Returns a reference to the x-axis object of the grid. |
Axis |
getGridYAxis()
Returns a reference to the y-axis object of the grid. |
Axis |
getGridZAxis()
Returns a reference to the z-axis object of the grid. |
void |
initGrid(Axis axisref1,
Axis axisref2,
Axis axisref3,
int gridaxistype,
int gridtype)
This method initializes a new Grid object based on the specified x- and y-axes. |
void |
initGrid(Axis axisref1,
Axis axisref2,
int gridaxistype,
int gridtype)
This method initializes a new Grid object based on the specified x- and y-axes. |
void |
setChartObjScale(PhysicalCoordinates transform)
Sets the reference to the PhysicalCoordinates object that the chart object is placed in. |
void |
setGridAxis(Axis axis)
Sets one of the axis objects of the grid. |
void |
setGridAxis(int axtype,
Axis axis)
Sets one of the axis objects of the grid. |
void |
setGridAxisPlane(int gridaxisplane)
Sets the axis intercept of the grid to the default value for the grid axis plane. |
void |
setGridAxisType(int naxis)
Sets the axis type that defines the grid spacing. |
void |
setGridType(int ngrid)
Sets the grid type. |
void |
setGridXAxis(Axis axis)
Sets the x-axis object of the grid. |
void |
setGridYAxis(Axis axis)
Sets the y-axis object of the grid. |
void |
setGridZAxis(Axis axis)
Sets the z-axis object of the grid. |
| Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
|---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Grid()
public Grid(Axis axisref1,
Axis axisref2,
int gridaxistype,
int gridtype)
axisref1 - The x-axis associated with the grid.axisref2 - The y-axis associated with the grid.gridaxistype - The grid is aligned with the tick marks of this axis. The grid is parallel to
the other axis. Use one of the axis constants, X_AXIS, Y_AXIS, or Z_AXIS.gridtype - Specifies if the grid aligns with the major tick marks (GRID_MAJOR), the minor tick
marks (GRID_MINOR) or the major and minor tick marks (GRID_ALL) of the reference axis.
public Grid(Axis axisref1,
Axis axisref2,
Axis axisref3,
int gridaxistype,
int gridtype)
axisref1 - The x-axis associated with the grid.axisref2 - The y-axis associated with the grid.axisref3 - The z-axis associated with the grid.gridaxistype - The grid is aligned with the tick marks of this axis. The grid is parallel to
the other axis. Use one of the axis constants, X_AXIS, Y_AXIS, or Z_AXIS.gridtype - Specifies if the grid aligns with the major tick marks (GRID_MAJOR), the minor tick
marks (GRID_MINOR) or the major and minor tick marks (GRID_ALL) of the reference axis.| Method Detail |
|---|
public int errorCheck(int nerror)
errorCheck in class GraphObjnerror - Current error state
public void setChartObjScale(PhysicalCoordinates transform)
setChartObjScale in class GraphObjtransform - A reference to the PhysicalCoordinates object that the chart object is placed in
public void initGrid(Axis axisref1,
Axis axisref2,
int gridaxistype,
int gridtype)
axisref1 - The first of the two axes associated with the grid.axisref2 - The second of the two axes associated with the grid.gridaxistype - The grid is aligned with the tick marks of this axis. The grid is parallel to
the other axis. Use one of the axis constants, X_AXIS, Y_AXIS, or Z_AXIS.gridtype - Specifies if the grid aligns with the major tick marks (GRID_MAJOR), the minor tick
marks (GRID_MINOR) or the major and minor tick marks (GRID_ALL) of the reference axis.
public void initGrid(Axis axisref1,
Axis axisref2,
Axis axisref3,
int gridaxistype,
int gridtype)
axisref1 - The x-axis associated with the grid.axisref2 - The y-axis associated with the grid.axisref3 - The z-axis associated with the grid.gridaxistype - The grid is aligned with the tick marks of this axis. The grid is parallel to
the other axis. Use one of the axis constants, X_AXIS, Y_AXIS or Z_AXIS.gridtype - Specifies if the grid aligns with the major tick marks (GRID_MAJOR), the minor tick
marks (GRID_MINOR) or the major and minor tick marks (GRID_ALL) of the reference axis.public void copy(Grid source)
source - The source grid object.public java.lang.Object clone()
clone in class GraphObjpublic void setGridAxisPlane(int gridaxisplane)
gridaxisplane - Specifies the grid axis plane. Use one of the plane constants:
XY_MINZ_PLANE, XY_MAXZ_PLANE, XZ_MINY_PLANE, XZ_MAXY_PLANE, YZ_MINX_PLANE, YZ_MAXX_PLANE.public Axis getGridXAxis()
public Axis getGridYAxis()
public Axis getGridZAxis()
public void setGridXAxis(Axis axis)
axis - Specifies the x-axis object of the grid.public void setGridYAxis(Axis axis)
axis - Specifies the y-axis object of the grid.public void setGridZAxis(Axis axis)
axis - Specifies the z-axis object of the grid.
public void setGridAxis(int axtype,
Axis axis)
axtype - Specifies the which axis object, either X_AXIS or Y_AXIS.axis - Specifies the axis object of the grid.public void setGridAxis(Axis axis)
axis - Specifies the axis object of the grid.public Axis getGridAxis(int axtype)
axtype - Specifies the which axis object, either X_AXIS or Y_AXIS.
public void draw(java.awt.Graphics2D g2)
draw in class GraphObjg2 - The graphics context.
public boolean checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
checkIntersection in class GraphObjtestpoint - The test pointnp - Nearest point information for data based objects.
public void setGridType(int ngrid)
ngrid - Specifies the grid type: Use one of the grid type constants: GRID_MAJOR,
GRID_MINOR or GRID_ALL.public int getGridType()
public void setGridAxisType(int naxis)
naxis - Specifies the grid axis type: Use one of the axis type constants: X_AXIS or Y_AXIS.public int getGridAxisType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||