talx x1.0.5

talx.controller.simple
Class BusyInboxHandler

java.lang.Object
  extended bytalx.controller.simple.BusyInboxHandler
All Implemented Interfaces:
ActionHandler, ControllerConstants, GUIStateConstants, SearchConstants, java.io.Serializable

public final class BusyInboxHandler
extends java.lang.Object
implements ActionHandler, GUIStateConstants, SearchConstants, ControllerConstants

Used when there is no message in the reader or composer.

See Also:
Serialized Form

Field Summary
 
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
 
Fields inherited from interface talx.model.mail.SearchConstants
hasBeenAnswered, hasBeenSeen, hasNotBeenAnswered, hasNotBeenSeen
 
Fields inherited from interface talx.controller.ControllerConstants
EXIT_COMMAND, FILE_ATTACHMENTS_KEY, ILLEGAL_ACTION_COMMAND, LOGOUT_COMMAND, MAIL_COUNT_CHANGED_COMMAND, REMOTE_GAME_COMMAND, SAVE_COMMAND, STOP_COMMAND, TEST_COMMAND
 
Method Summary
 boolean canRun(GUIState state, Controller c)
          This method tells the controller whether the given handler will function in the given GUIState.
static BusyInboxHandler getInstance()
          Returns the only object of this type.
 ActionHandler handleAction(java.awt.event.ActionEvent ev, Controller c)
          Handles mailboxes, archives, start-games, and person-actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BusyInboxHandler getInstance()
Returns the only object of this type.


canRun

public boolean canRun(GUIState state,
                      Controller c)
Description copied from interface: ActionHandler
This method tells the controller whether the given handler will function in the given GUIState. For example, if a given handler only responds to Inbox actions, then this method should test the given GUIState to make sure the inbox flag is set.

Specified by:
canRun in interface ActionHandler
Parameters:
state - the current visual state of the system
Returns:
true if the given visual state will support this behavioral state. False if using this handler would lock up the system.

handleAction

public ActionHandler handleAction(java.awt.event.ActionEvent ev,
                                  Controller c)
                           throws ActionVetoException
Handles mailboxes, archives, start-games, and person-actions.

Specified by:
handleAction in interface ActionHandler
Throws:
ActionVetoException - to suppress a controller change finished event upon termination.

talx x1.0.5

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