Class ERView

java.lang.Object
  |
  +--GBFrame
        |
        +--ERView

public class ERView
extends GBFrame

A view for the Emergency Room priority queue demo, using BreezySwing.

Since:
JDK1.2
See Also:
Serialized Form

Constructor Summary
ERView(ERModel er)
          Creates a new ERView using the specified ERModel object.
 
Method Summary
 void buttonClicked(javax.swing.JButton buttonObj)
          Responds to button clicks in the ERView GUI.
 void update(java.lang.String message)
          Updates the ERView GUI to show the current message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERView

public ERView(ERModel er)
Creates a new ERView using the specified ERModel object. This method gets called automatically when you run the ERModel application. This method should store the ERModel object as an instance variable, and set up some widgets for the GUI.

Parameters:
er - the ERModel object accessed by this GUI
Method Detail

update

public void update(java.lang.String message)
Updates the ERView GUI to show the current message. This method gets called by the ERModel application. This method should append the message string to the text area.

Parameters:
message - the ERModel's message

buttonClicked

public void buttonClicked(javax.swing.JButton buttonObj)
Responds to button clicks in the ERView GUI. This method should check which button has been clicked. Clicking the Schedule button should result in calling the ERModel object's schedule method with the appropriate arguments (patient name and priority). Clicking the All button should result in calling the ERModel object's treatAll method. Clicking the Next button should result in calling the ERModel object's treatNext method.

Parameters:
buttonObj - the button that was clicked