|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GridPlotter
Grid Plotter:
The GridPlotter class provides methods for drawing in
a grid by placing color blocks in its cells.
Each drawing method should take zero arguments, should
have a void return type, and should have a name that conforms
to the on...ButtonClick format. (This restriction allows the
GridPlotterGUI to recognize drawing methods, for which
it automatically generates buttons.)
Constructor Summary | |
GridPlotter(GridPlotterGUI disp,
edu.kzoo.grid.gui.nuggets.ColorChoiceMenu colorChooser)
Constructs an object that could draw in a grid. |
Method Summary | |
void |
onClearGridButtonClick()
Removes all objects from the grid. |
void |
onColMajorFillButtonClick()
Fills in all the cells of the grid using a column-major traversal. |
void |
onRowMajorFillButtonClick()
Fills in all the cells of the grid using a row-major traversal. |
void |
reactToNewGrid(edu.kzoo.grid.Grid grid)
Sets the grid in which to draw. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GridPlotter(GridPlotterGUI disp, edu.kzoo.grid.gui.nuggets.ColorChoiceMenu colorChooser)
disp
- an object that knows how to display a gridcolorChooser
- a menu for choosing the color block colorMethod Detail |
public void reactToNewGrid(edu.kzoo.grid.Grid grid)
reactToNewGrid
in interface edu.kzoo.grid.gui.GridChangeListener
public void onClearGridButtonClick()
public void onRowMajorFillButtonClick()
public void onColMajorFillButtonClick()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |