Class EnvPlotter
java.lang.Object
|
+--EnvPlotter
- public class EnvPlotter
- extends java.lang.Object
Environment-Based Applications:
The EnvPlotter class provides methods for drawing in
an environment by placing color blocks in its cells.
Each drawing method should take a Color object as a
parameter (the color with which to draw), and should
have a void return type. (This restriction allows the
EnvPlotterGUI to recognize drawing methods, for which
it automatically generates buttons.)
- Version:
- 1 January 2003
Constructor Summary |
EnvPlotter(BoundedEnv env,
SettableEnvDisplay disp)
Constructs an object that draws in the specified environment. |
Method Summary |
void |
clearEnv()
Removes all objects from the environment. |
void |
colMajorFill(java.awt.Color color)
Fills in all the cells of the environment using a column-major
traversal. |
void |
configure(BoundedEnv env,
SettableEnvDisplay disp)
Constructs an object that draws in the specified environment. |
void |
rowMajorFill(java.awt.Color color)
Fills in all the cells of the environment using a row-major
traversal. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnvPlotter
public EnvPlotter(BoundedEnv env,
SettableEnvDisplay disp)
- Constructs an object that draws in the specified environment.
- Parameters:
env
- the environment in which to drawdisp
- an object that knows how to display an environment
configure
public void configure(BoundedEnv env,
SettableEnvDisplay disp)
- Constructs an object that draws in the specified environment.
- Parameters:
env
- the environment in which to drawdisp
- an object that knows how to display an environment
clearEnv
public void clearEnv()
- Removes all objects from the environment.
rowMajorFill
public void rowMajorFill(java.awt.Color color)
- Fills in all the cells of the environment using a row-major
traversal.
- Parameters:
color
- the color to use when filling in cells
colMajorFill
public void colMajorFill(java.awt.Color color)
- Fills in all the cells of the environment using a column-major
traversal.
- Parameters:
color
- the color to use when filling in cells