Minnow Project

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.
 

Constructor Detail

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 title
backgroundColor - color to paint background of environment
viewingWidth - the width of the viewing area
viewingHeight - the height of the viewing area
minCellSize - minimum environment cell side length
Method Detail

setEnv

public void setEnv(Environment environment)
Sets the Environment being displayed. (Precondition: env is not null.)
Parameters:
environment - the Environment to display

Minnow Project

Copyright© 2002-2003 Alyce Brady