|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--canvas.DrawingGrid
Represents a grid coordinate for usage with a DrawingPane.
| Constructor Summary | |
DrawingGrid(int gridWidth,
int gridHeight,
canvas.DrawingPane dp)
Creates a new DrawingGrid for usage in a DrawingPane. |
|
| Method Summary | |
double |
convertG2Px(double x)
Convert the Grid x coordinate to a pixel coordinate. |
double |
convertG2Px(int x)
Convert the Grid x coordinate to a pixel coordinate. |
double |
convertG2Py(double y)
Convert the Grid y coordinate to a pixel coordinate. |
double |
convertG2Py(int y)
Convert the Grid y coordinate to a pixel coordinate. |
canvas.DrawingPane |
getDrawingPane()
Return the DrawingPane associated with this DrawingGrid. |
double |
getGBoxHeight()
Returns the number of pixels representing the height of a Grid box. |
double |
getGBoxWidth()
Returns the number of pixels representing the width of a Grid box. |
int |
getGridHeight()
Return the number of rows in the grid. |
int |
getGridWidth()
Return the number of columns in the grid. |
double |
getMiddleX()
Returns the middle x coordinate of the DrawingGrid in GridBox terms. |
double |
getMiddleY()
Returns the middle y coordinate of the DrawingGrid in GridBox terms. |
void |
removeGrid()
Remove the Grid from the DrawingPane. |
void |
removeGridLabels()
Remove the Grid labels from the DrawingPane. |
void |
setGridDim(int x,
int y)
Reset the number of columns and rows in the grid. |
void |
showGrid()
Display the Grid on the DrawingPane. |
void |
showGridLabels()
Display the Grid labels on the DrawingPane. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DrawingGrid(int gridWidth,
int gridHeight,
canvas.DrawingPane dp)
DrawingPane.
gridWidth - The number of columns in the Grid.gridHeight - The number of rows in the Grid.dp - The DrawingPane to be associated with this DrawingGrid| Method Detail |
public int getGridWidth()
public int getGridHeight()
public canvas.DrawingPane getDrawingPane()
public double convertG2Px(double x)
public double convertG2Px(int x)
public double convertG2Py(double y)
public double convertG2Py(int y)
public void setGridDim(int x,
int y)
public void showGrid()
public void removeGrid()
public void showGridLabels()
public void removeGridLabels()
public double getGBoxWidth()
public double getGBoxHeight()
public double getMiddleX()
public double getMiddleY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||