games.strategy.engine.framework.startup.ui
Class InGameLobbyWatcher

java.lang.Object
  extended by games.strategy.engine.framework.startup.ui.InGameLobbyWatcher

public class InGameLobbyWatcher
extends java.lang.Object

Watches a game in progress, and updates the Lobby with the state of the game.

This class opens its own connection to the lobby, and its own messenger.

Author:
sgb

Field Summary
static java.lang.String LOBBY_WATCHER_NAME
           
 
Constructor Summary
InGameLobbyWatcher(IMessenger messenger, IRemoteMessenger remoteMessenger, IServerMessenger serverMessenger, javax.swing.JComponent parent)
           
 
Method Summary
 java.lang.String getComments()
           
 boolean isActive()
           
static InGameLobbyWatcher newInGameLobbyWatcher(IServerMessenger gameMessenger, javax.swing.JComponent parent)
          Reads SystemProperties to see if we should connect to a lobby server After creation, those properties are cleared, since we should watch the first start game.
 void setGame(IGame game)
           
 void setGameComments(java.lang.String comments)
           
 void setGameSelectorModel(GameSelectorModel model)
           
 void setGameStatus(GameDescription.GameStatus status, IGame game)
           
 void shutDown()
           
protected  void updatePlayerCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOBBY_WATCHER_NAME

public static final java.lang.String LOBBY_WATCHER_NAME
See Also:
Constant Field Values
Constructor Detail

InGameLobbyWatcher

public InGameLobbyWatcher(IMessenger messenger,
                          IRemoteMessenger remoteMessenger,
                          IServerMessenger serverMessenger,
                          javax.swing.JComponent parent)
Method Detail

newInGameLobbyWatcher

public static InGameLobbyWatcher newInGameLobbyWatcher(IServerMessenger gameMessenger,
                                                       javax.swing.JComponent parent)
Reads SystemProperties to see if we should connect to a lobby server

After creation, those properties are cleared, since we should watch the first start game.

Returns:
null if no watcher should be created

setGame

public void setGame(IGame game)

setGameSelectorModel

public void setGameSelectorModel(GameSelectorModel model)

updatePlayerCount

protected void updatePlayerCount()

shutDown

public void shutDown()

isActive

public boolean isActive()

setGameStatus

public void setGameStatus(GameDescription.GameStatus status,
                          IGame game)

getComments

public java.lang.String getComments()

setGameComments

public void setGameComments(java.lang.String comments)