nz.ac.waikato.mcennis.rat.gui
Class SwingUpdater

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.gui.SwingUpdater
All Implemented Interfaces:
Listener

public class SwingUpdater
extends java.lang.Object
implements Listener

Controller for recieving updates during execution and then scheduling them on the GUI thread for updating the GUI.


Nested Class Summary
 class SwingUpdater.DoChange
          Class object representing a message containing info about the current state of the application's execution.
 
Constructor Summary
SwingUpdater(RatGui gui)
          Create a new updater linked to the GUI
 
Method Summary
 void publishChange(Model m, int type, int argument)
          Recieve and update of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUpdater

public SwingUpdater(RatGui gui)
Create a new updater linked to the GUI

Parameters:
gui - GUI to publishn to.
Method Detail

publishChange

public void publishChange(Model m,
                          int type,
                          int argument)
Description copied from interface: Listener
Recieve and update of the given type.

Specified by:
publishChange in interface Listener
Parameters:
m - model that changed
type - type of change that has occured