client.framework.views
Class SettingsWindow

java.lang.Object
  extended by Form
      extended by client.framework.views.SettingsWindow

public class SettingsWindow
extends Form

This class is a simple form that shows a list of the currently active settings of the game, and enables editing these. An object from this class is only used and displayed if the user selects "Change Settings" in the LobbyView class. When the user have changed the wanted settings, he clicks "OK" and returns to the lobby.

Author:
Eivind Sorteberg, Martin Jarrett

Constructor Summary
SettingsWindow(AbstractGame model)
          Called when a screen for editing settings is needed.
 
Method Summary
 void commandAction(Command command, Displayable displayable)
          Method implemented from CommandListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingsWindow

public SettingsWindow(AbstractGame model)
Called when a screen for editing settings is needed. This constructor creates a form and attaches components to this form so that the user may edit the settings. When done, the user clicks "OK" and returns to the lobby.

Parameters:
model - The model containing the settings.
Method Detail

commandAction

public void commandAction(Command command,
                          Displayable displayable)
Method implemented from CommandListener. Is called when the user clicks the "OK" command, and closes the form. In this process, the list of settings is sent to the model to check whether any settings have been changed.

Parameters:
command - The only possible command is "OK".
displayable - This form.
See Also:
AbstractGame.fireSettingsUpdated(java.util.Hashtable)