talx x1.0.5

talx.view
Class DialogManager

java.lang.Object
  extended bytalx.view.DialogManager
All Implemented Interfaces:
ControllerListener, DesktopConstants, java.util.EventListener, GUIStateConstants, TALComponent

public final class DialogManager
extends java.lang.Object
implements ControllerListener, GUIStateConstants, DesktopConstants, TALComponent

Component to show and hide dialogs as requested by controller. Unlike other Think-and-link top-level view components, the dialog manager component is a single class, determined at compile-time.


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.util.DesktopConstants
ARROW_IMAGES, COVER_LAYER_OFFSET, DIALOG_LAYER_OFFSET, DOWN_ARROW, DOWN_TRIANGLE, DOWN_WORD_EN, INFO_ICON, INFO_LAYER_OFFSET, POINTER_LAYER_OFFSET, QUESTION_ICON, UP_ARROW, UP_TRIANGLE, UP_WORD_EN
 
Constructor Summary
DialogManager(MailSystemDesktop ms, Settings settings)
           
 
Method Summary
 void changeTask(java.lang.String text)
          Places small text box above the other components.
 void controllerChange(ControllerChangeEvent ev)
          Sent when the controller wants the GUI to change state.
 void controllerChangeFinished(ChangeFinishedEvent ev)
          Sent when the system has finished transitioning to a new state.
 void controllerChangeVetoed(ActionVetoException ex)
          Sent when the system has decided not to transition on a user action.
 java.awt.Component getFocusCycleCurrent()
          Gets the current component in the focus cycle.
 java.awt.Component getFocusCycleStart()
          Resets the focus cycle and returns the first component.
 java.awt.Component getNextFocusOwner()
          Gets the next component in the focus cycle.
 java.awt.Component getPreviousFocusOwner()
          Gets the next component in the focus cycle.
 void hideTask()
          Removes the task dialog, if showing.
 void hideTask(int pauseCount)
          Waits the given number of milliseconds and then removes the task dialog.
 boolean isFocusable(java.awt.Component c)
          Returns true if the given component should receive focus.
 boolean isFocusCycleEnd()
          Returns true if the focus is currently on the last element of the cycle.
 boolean isTaskTemporary()
          Returns true is task is scheduled for being hiden.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogManager

public DialogManager(MailSystemDesktop ms,
                     Settings settings)
Method Detail

changeTask

public void changeTask(java.lang.String text)
Places small text box above the other components. There is only one task at a time, so subsequent calls to changeTask will result in the task text being changed, but will not open more task dialogs.

Parameters:
text - the message to show.

hideTask

public void hideTask()
Removes the task dialog, if showing.


hideTask

public void hideTask(int pauseCount)
Waits the given number of milliseconds and then removes the task dialog.

Parameters:
pauseCount - of pause periods to wait.

isTaskTemporary

public boolean isTaskTemporary()
Returns true is task is scheduled for being hiden. This method checks to see if a call to hideTask(long) has occured but the expired time has not elapsed


controllerChange

public void controllerChange(ControllerChangeEvent ev)
Sent when the controller wants the GUI to change state.

Specified by:
controllerChange in interface ControllerListener

controllerChangeFinished

public void controllerChangeFinished(ChangeFinishedEvent ev)
Description copied from interface: ControllerListener
Sent when the system has finished transitioning to a new state.

Specified by:
controllerChangeFinished in interface ControllerListener

controllerChangeVetoed

public void controllerChangeVetoed(ActionVetoException ex)
Description copied from interface: ControllerListener
Sent when the system has decided not to transition on a user action.

Specified by:
controllerChangeVetoed in interface ControllerListener

getFocusCycleStart

public java.awt.Component getFocusCycleStart()
Resets the focus cycle and returns the first component.

Specified by:
getFocusCycleStart in interface TALComponent

getNextFocusOwner

public java.awt.Component getNextFocusOwner()
Gets the next component in the focus cycle.

Specified by:
getNextFocusOwner in interface TALComponent

getPreviousFocusOwner

public java.awt.Component getPreviousFocusOwner()
Gets the next component in the focus cycle.

Specified by:
getPreviousFocusOwner in interface TALComponent

getFocusCycleCurrent

public java.awt.Component getFocusCycleCurrent()
Gets the current component in the focus cycle.

Specified by:
getFocusCycleCurrent in interface TALComponent

isFocusCycleEnd

public boolean isFocusCycleEnd()
Returns true if the focus is currently on the last element of the cycle.

Specified by:
isFocusCycleEnd in interface TALComponent

isFocusable

public boolean isFocusable(java.awt.Component c)
Returns true if the given component should receive focus.

Specified by:
isFocusable in interface TALComponent

talx x1.0.5

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