|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttalx.controller.Controller
Determines the state and behaviors of the system.
| Field Summary | |
static java.lang.String |
LOCK_LOCATION
|
static java.lang.String |
SAVE_LOCATION
|
| Constructor Summary | |
Controller(MailSystemDesktop ms,
TransportToolkit tt,
GameManager gm,
Settings settings,
java.lang.String userDir)
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ev)
Performs the given action provided no action is in progress or the action did not originate from a GUI component. |
void |
addControllerListener(ControllerListener l)
Adds the specified listener to the controller change and illegal button events. |
void |
addInterceptor(Interceptor f)
Adds the specified interceptor to the chain of responsibility. |
void |
doAction(java.awt.event.ActionEvent ev)
Queues the given action to be performed. |
void |
fireControllerChange()
Broadcasts the current visual state of the application to all listeners. |
ActionHandler |
getActionHandler()
Returns the current behavioral state. |
GameLogger |
getGameLogger()
Returns the logger that should listen to all games. |
GameManager |
getGameManager()
Returns the game manager for the application. |
GUIState |
getGUIState()
Returns the current visual state of the application. |
ActionHandler |
getInitialActionHandler()
Return the initial action handler specified in the settings. |
TALLogger |
getLogger(ReceiverFilter instack,
SenderFilter outstack)
Return the TALLogger subclass specified in the settings. |
java.lang.String |
getRootDirectory()
Returns the root directory for the current user. |
Settings |
getSettings()
Returns the settings for the application. |
TransportToolkit |
getToolkit()
Returns the transport toolkit for the application. |
MailSystemDesktop |
getView()
Returns the visual component hierarchy. |
void |
initialize(ReceiverFilter instack,
SenderFilter outstack)
Attempts to restore saved state. |
void |
removeControllerListener(ControllerListener l)
Removes the specified listener from the queue for this controller. |
void |
removeLock()
Deletes the lock file so that restoreState will read state file. |
void |
restoreState()
|
void |
saveState()
Saves the current state of the machine. |
void |
setGUIState(GUIState s)
Sets the current visual state to the given state. |
void |
stop()
Clears any queued actions and stops the action processor thread. |
static void |
sync()
Hangs until all events in the AWT event queue have been processed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SAVE_LOCATION
public static final java.lang.String LOCK_LOCATION
| Constructor Detail |
public Controller(MailSystemDesktop ms,
TransportToolkit tt,
GameManager gm,
Settings settings,
java.lang.String userDir)
| Method Detail |
public void initialize(ReceiverFilter instack,
SenderFilter outstack)
java.lang.IllegalStateException - if the handler has already been set.
java.lang.NullPointerException - if the state cannot be restored and the
initial handler in the settings is not a legal initial handler class.public void stop()
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed in interface java.awt.event.ActionListenerpublic static void sync()
public void addInterceptor(Interceptor f)
public void addControllerListener(ControllerListener l)
public void removeControllerListener(ControllerListener l)
public void fireControllerChange()
public void setGUIState(GUIState s)
public MailSystemDesktop getView()
public GUIState getGUIState()
public Settings getSettings()
public TransportToolkit getToolkit()
public GameManager getGameManager()
public GameLogger getGameLogger()
public ActionHandler getActionHandler()
public java.lang.String getRootDirectory()
public void doAction(java.awt.event.ActionEvent ev)
public ActionHandler getInitialActionHandler()
public TALLogger getLogger(ReceiverFilter instack,
SenderFilter outstack)
public void saveState()
public void removeLock()
public void restoreState()
throws java.io.IOException,
java.lang.ClassNotFoundException,
javax.mail.MessagingException
java.io.IOException
java.lang.ClassNotFoundException
javax.mail.MessagingException
|
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.