Class AquaSimGUI


public class AquaSimGUI
extends edu.neu.ccs.gui.DisplayPanel

Aquarium Lab Series: The AquaSimGUI class provides a graphical user interface to the Aquarium Lab Series. This class uses the Java Power Tools (JPT) classes from Northeastern University to build the graphical interface. In particular, it inherits the repaint method (which does not appear in the specification for this class) from the JPT DisplayPanel class. The repaint method draws the components in the graphical user interface.

Version:
10 July 2002, 24 March 2004
Author:
Alyce Brady, Kelly Schultz

Constructor Summary
AquaSimGUI(Aquarium aquarium)
          Construct a simple graphical user interface for the Aquarium Simulation program.
 
Method Summary
 void pauseToView()
          Pause so user can view the display.
 void show(AquaFish[] fishList)
          Display all the AquaFish in the fishList array.
 void show(java.util.ArrayList fishList)
          Display all the AquaFish in the fishList list.
 void showAquarium()
          Display only the Aquarium: paint the aquarium blue to cover up old fish.
 void showFish(AquaFish fish)
          Display a single AquaFish.

Constructor Detail

AquaSimGUI

public AquaSimGUI(Aquarium aquarium)
Construct a simple graphical user interface for the Aquarium Simulation program.

Parameters:
aquarium - the aquarium in which the fish swim
Method Detail

show

public void show(AquaFish[] fishList)
Display all the AquaFish in the fishList array. Paints the aquarium blue to cover up old fish and displays the fish in the array.

Parameters:
fishList - the array of AquaFish to be displayed

show

public void show(java.util.ArrayList fishList)
Display all the AquaFish in the fishList list. Paints the aquarium blue to cover up old fish and displays the fish in the list.

Parameters:
fishList - the list of AquaFish to be displayed

showAquarium

public void showAquarium()
Display only the Aquarium: paint the aquarium blue to cover up old fish. Not necessary when displaying an entire vector of fish.


showFish

public void showFish(AquaFish fish)
Display a single AquaFish.

Parameters:
fish - the fish to be displayed

pauseToView

public void pauseToView()
Pause so user can view the display.