|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttalx.controller.HandlerUtils
Utility functions for handler classes. This class defined an API of handler behaviors that can be shared throughout various handler sets. All handlers are encouraged to call the initialize method here.
| Field Summary |
| 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 |
| Fields inherited from interface talx.util.MailConstants |
ARCHIVE_ID, BOUNCE_HEADER, COMPOSE_TIME, DEFAULT_ID, ERASE_COUNTS, EXPIRATION_TIME, NO_DELETE, NO_REPLY, REMINDER |
| Constructor Summary | |
HandlerUtils()
|
|
| Method Summary | |
static javax.mail.internet.MimeMessage |
constructMessageFromComposer(Controller c,
GUIState state,
javax.mail.internet.MimeBodyPart[] attachments)
Constructs a message from the data in the composer and state. |
static void |
handleAbort(Controller c)
Handles aborting a composition. |
static void |
handlePostpone(Controller c)
Handles postponing a composition. |
static void |
handleReply(Controller c)
Handles replying to a message. |
static void |
handleSend(Controller c)
Handles sending a composition. |
static void |
initialize(Controller c)
Handles shared state initialization. |
static GUIState |
setComposeCaption(GUIState s,
Settings settings)
Returns a state with an appropriate composer caption. |
static void |
showArchive(Archive a,
Controller c)
Handles showing an archive message. |
static void |
showGame(StartGame sg,
Controller c)
Handles showing a game screen. |
static void |
showMailCounts(Person p,
Controller c)
Handles showing new mail counts when a PersonActionEvent occurs. |
static boolean |
showMessage(MailBox b,
Controller c)
Handles showing a message when a mailbox is activated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HandlerUtils()
| Method Detail |
public static void initialize(Controller c)
public static void showArchive(Archive a,
Controller c)
public static void showGame(StartGame sg,
Controller c)
java.lang.NullPointerException - if the game is not properly installed.
When this happens, this method also displays that fact in the task frame.
ActionHandlers should generally catch this and throw an ActionVetoExcpetion.
public static void showMailCounts(Person p,
Controller c)
public static boolean showMessage(MailBox b,
Controller c)
public static void handleReply(Controller c)
public static void handleSend(Controller c)
public static void handleAbort(Controller c)
public static void handlePostpone(Controller c)
public static javax.mail.internet.MimeMessage constructMessageFromComposer(Controller c,
GUIState state,
javax.mail.internet.MimeBodyPart[] attachments)
throws javax.mail.MessagingException
attachments - if null, the message is constructed as a single part,
otherwise, the message is a multipart message with the composer text inline, and
the attachments included. Notice that if attachements is empty (ie had length 0)
the message is still multipart, but it has only one part.
javax.mail.MessagingException
public static GUIState setComposeCaption(GUIState s,
Settings settings)
s - the state containing the appropriate list of people.settings - the settings containing the base initiate and response captions.
|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.