PamView
Class PamView

java.lang.Object
  extended by PamView.PamView
All Implemented Interfaces:
PamViewInterface
Direct Known Subclasses:
PamGui

public abstract class PamView
extends java.lang.Object
implements PamViewInterface

Author:
Doug Gillespie

Makes a simple display with a main GUI and a list of data objects.


Field Summary
protected  javax.swing.JFrame frame
          Frame for main window associated with this view (i.e a PamGUI).
private  int frameNumber
           
protected  PamControllerInterface pamControllerInterface
           
protected  PamModelInterface pamModelInterface
           
 
Constructor Summary
PamView(PamControllerInterface pamControllerInterface, PamModelInterface pamModelInterface, int frameNumber)
           
 
Method Summary
 int getFrameNumber()
           
 javax.swing.JFrame getGuiFrame()
           
abstract  java.lang.String getViewName()
           
abstract  void renameControlledUnit(PamControlledUnit pamControlledUnit)
           
 void setFrameNumber(int frameNumber)
           
abstract  void showControlledUnit(PamControlledUnit pamControlledUnit)
          tells the view to show the main display panel of a pamControlledUnit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface PamView.PamViewInterface
addControlledUnit, enableGUIControl, modelChanged, pamEnded, pamStarted, removeControlledUnit, setTitle
 

Field Detail

pamControllerInterface

protected PamControllerInterface pamControllerInterface

pamModelInterface

protected PamModelInterface pamModelInterface

frame

protected javax.swing.JFrame frame
Frame for main window associated with this view (i.e a PamGUI).


frameNumber

private int frameNumber
Constructor Detail

PamView

public PamView(PamControllerInterface pamControllerInterface,
               PamModelInterface pamModelInterface,
               int frameNumber)
Method Detail

showControlledUnit

public abstract void showControlledUnit(PamControlledUnit pamControlledUnit)
tells the view to show the main display panel of a pamControlledUnit

Specified by:
showControlledUnit in interface PamViewInterface
Parameters:
pamControlledUnit -

renameControlledUnit

public abstract void renameControlledUnit(PamControlledUnit pamControlledUnit)

getViewName

public abstract java.lang.String getViewName()

getFrameNumber

public int getFrameNumber()
Specified by:
getFrameNumber in interface PamViewInterface
Returns:
Frame number used by the multiple GUI frames. All other objects, such as the model view should return < 0.

getGuiFrame

public javax.swing.JFrame getGuiFrame()
Specified by:
getGuiFrame in interface PamViewInterface

setFrameNumber

public void setFrameNumber(int frameNumber)