client.framework.views
Class SessionWindow

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

public class SessionWindow
extends Form

A Form extension that lists the currently active on the server when the client has connected to the server. The user may select to join one of the listed sessions, or to create a new session.

Author:
Eivind Sorteberg, Martin Jarrett

Constructor Summary
SessionWindow(AbstractGame model)
          Creates the session window.
 
Method Summary
 void commandAction(Command command, Displayable displayable)
          Called when the user selects one of the available commands.
 void fireSessionsUpdated()
          Called when a new list of sessions is received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionWindow

public SessionWindow(AbstractGame model)
Creates the session window.

Parameters:
model - The main model for the client application.
Method Detail

commandAction

public void commandAction(Command command,
                          Displayable displayable)
Called when the user selects one of the available commands. The result of this depends on the command selected.

Parameters:
command - The command the user selected.
displayable - Not used.

fireSessionsUpdated

public void fireSessionsUpdated()
Called when a new list of sessions is received. Refreshes the session list.