client.framework.views
Class LobbyView

java.lang.Object
  extended by GameCanvas
      extended by client.framework.views.LobbyView

public class LobbyView
extends GameCanvas

The screen shown as default when starting the application. This screen does not contain any information such as player lists, but gets the information its draws through the AbstractGame object. In addition to drawing contents to the screen, this class is responsible for detecting and handling user inputs when this screen is active.

Author:
Martin Jarrett, Eivind Sorteberg

Constructor Summary
LobbyView(AbstractGame model)
          Contructor for this class.
 
Method Summary
 void commandAction(Command command, Displayable displayable)
          Method implemented from CommandListener.
 void notifyAboutPlayerListChanged()
           
 void paint(Graphics graphics)
          Overrides the class' default paint method and is called whenever the contents of the Lobby change.
 void setGameStarted(boolean started)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LobbyView

public LobbyView(AbstractGame model)
Contructor for this class. Initialises the commands and sets the player list as default start-up view.

Parameters:
model - The game model.
Method Detail

commandAction

public void commandAction(Command command,
                          Displayable displayable)
Method implemented from CommandListener. Called whenever the user selects one of the commands, and performs corresponding actions. These actions are either a change of state in this object, or a method found in AbstractGame.

Parameters:
command - The command selected by the user.
displayable - This screen.
See Also:
LobbyView#paint(javax.microedition.lcdui.Graphics)

paint

public void paint(Graphics graphics)
Overrides the class' default paint method and is called whenever the contents of the Lobby change. Dependent of the current state of the Lobby, different contents are drawn. The three possible states are to show players (default), messages or settings.

Parameters:
graphics - The default graphics object used for this GameCanvas

setGameStarted

public void setGameStarted(boolean started)

notifyAboutPlayerListChanged

public void notifyAboutPlayerListChanged()