Class MinnowGUI
MinnowGUI
- public class MinnowGUI
Minnow Program:
The MinnowGUI
class provides a window in which
to run and display the environment in the Minnow program.
- Version:
- 1 January 2003
Constructor Summary |
MinnowGUI(java.lang.String title,
java.awt.Color bgColor,
int viewingWidth,
int viewingHeight,
int minCellSize)
Creates a new MinnowGUI with no menu bar. |
Method Summary |
void |
setEnv(Environment environment)
Sets the Environment being displayed. |
MinnowGUI
public MinnowGUI(java.lang.String title,
java.awt.Color bgColor,
int viewingWidth,
int viewingHeight,
int minCellSize)
- Creates a new MinnowGUI with no menu bar. Subclasses should
not invoke this constructor; they should call
the
init
method directly from their own constructors.
(The init
method uses the Template Method design
pattern, which does not work correctly in superclass constructors.)
- Parameters:
title
- frame titlebackgroundColor
- color to paint background of environmentviewingWidth
- the width of the viewing areaviewingHeight
- the height of the viewing areaminCellSize
- minimum environment cell side length
setEnv
public void setEnv(Environment environment)
- Sets the Environment being displayed.
(Precondition: env is not null.)
- Parameters:
environment
- the Environment to display
Copyright© 2002-2003 Alyce Brady