uk.ac.ed.inf.sdp2012.group7.ui
Class ControlGUI

java.lang.Object
  extended by uk.ac.ed.inf.sdp2012.group7.ui.ControlGUI
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener

public class ControlGUI
extends java.lang.Object
implements javax.swing.event.ChangeListener

Creates and maintains the swing-based Control GUI, which provides both control manipulation (pitch choice, direction, etc) and threshold setting. Also allows the saving/loading of threshold values to a file.

Author:
s0840449

Constructor Summary
ControlGUI(Strategy s)
          Default constructor.
 
Method Summary
 void initGUI()
          Initialise the GUI, setting up all of the components and adding the required listeners.
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlGUI

public ControlGUI(Strategy s)
Default constructor.

Parameters:
thresholdsState - A ThresholdsState object to update the threshold slider values.
worldState - A WorldState object to update the pitch choice, shooting direction, etc.
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

initGUI

public void initGUI()
Initialise the GUI, setting up all of the components and adding the required listeners.