talx x1.0.5

talx.games.helpdesk
Class HelpDeskHandler

java.lang.Object
  extended bytalx.games.helpdesk.HelpDeskHandler
All Implemented Interfaces:
GameHandler, GUIStateConstants

public class HelpDeskHandler
extends java.lang.Object
implements GameHandler, GUIStateConstants


Field Summary
static java.lang.String START_CAPTION
          Holds copy of start game caption text.
 
Fields inherited from interface talx.model.GUIStateConstants
ACTIVE_COMMANDS, ARCHIVE_MESSAGE, CHOICE_DIALOG, COMPOSE_FOCUS, COMPOSE_WINDOW, COMPOSER_CAPTION, COMPOSER_DIRTY, CONFIRM_DIALOG, CURRENT_PEOPLE, CURRENT_PLAYER, DEFAULT_MESSAGE, DIALOG_FOCUS, DIALOG_TEXT, INBOX_FOCUS, INBOX_MAIL_COUNTS, INBOX_MAIL_COUNTS_ANSWERED, INBOX_MAIL_COUNTS_NEW, INBOX_PANEL, INBOX_PLAYER_CAPTIONS, NO_CHANGE, NO_MESSAGE, NO_PEOPLE, NO_PERSON, NO_PLAYER, READER_CAPTION, READER_FOCUS, READER_HEADERS, READER_WINDOW, STATE_ABBR, STATE_CONST, STATE_DESC
 
Method Summary
static HelpDeskHandler getInstance()
          Returns the singleton instance of this class.
 java.lang.String handleLocalAction(java.awt.event.ActionEvent ev)
          Handles a game state change initiated by the local player.
 java.lang.String handleRemoteAction(GameChangeProposedEvent ev)
          Handles a game state change initiated by a remote player.
 java.lang.String handleStartGame(Game g)
          Handles a start game action.
 GameState initialize(Game g, Player p)
          Produces a GameState object that is suitable for beginning play.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_CAPTION

public static final java.lang.String START_CAPTION
Holds copy of start game caption text. Actual controls will get it from GUIstate.

See Also:
Constant Field Values
Method Detail

getInstance

public static HelpDeskHandler getInstance()
Returns the singleton instance of this class.


handleLocalAction

public java.lang.String handleLocalAction(java.awt.event.ActionEvent ev)
Description copied from interface: GameHandler
Handles a game state change initiated by the local player.

Specified by:
handleLocalAction in interface GameHandler
Returns:
the text to place on the start game button in the inbox.

handleRemoteAction

public java.lang.String handleRemoteAction(GameChangeProposedEvent ev)
Description copied from interface: GameHandler
Handles a game state change initiated by a remote player.

Specified by:
handleRemoteAction in interface GameHandler
Returns:
the text to place on the start game button in the inbox.

handleStartGame

public java.lang.String handleStartGame(Game g)
Description copied from interface: GameHandler
Handles a start game action. Depending on the game state, the handler may choose to start a new game, or ignore this action.

Specified by:
handleStartGame in interface GameHandler
Returns:
the text to place on the start game button in the inbox.

initialize

public GameState initialize(Game g,
                            Player p)
Description copied from interface: GameHandler
Produces a GameState object that is suitable for beginning play. Since GameHandlers are stateless, any configuration data should be obtained from the given Game object.

Specified by:
initialize in interface GameHandler
Returns:
the text to place on the start game button in the inbox.

talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.