talx x1.0.5

tal
Class TalPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bydesktop.TrainingPanel
                      extended bytal.TalPanel
All Implemented Interfaces:
javax.accessibility.Accessible, ConstraintConstants, java.awt.image.ImageObserver, KeyboardConstants, java.awt.MenuContainer, java.io.Serializable, SettingsConstants, TalConstants, TrainingComponent

public class TalPanel
extends TrainingPanel
implements ConstraintConstants, TalConstants, KeyboardConstants

The visual component that mimics the Think-And-Link email program. This TrainingPanel is a mock TAL email interface. The components of this panel all come from the tal.component package.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class desktop.TrainingPanel
TrainingPanel.KeyValue, TrainingPanel.StartSoundThread, TrainingPanel.TaskPropertyMap
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String INSTRUCTION_LABEL
          The name of this component.
static java.lang.String NAME
          The name of this component.
 
Fields inherited from class desktop.TrainingPanel
sound
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface constraint.ConstraintConstants
ACTION_COMMAND_KEY, ACTION_TYPE_SOUND_FINISHED, COMPONENT_FINGER_POSITION, COMPONENT_FINGER_PRESS_POSITION, COMPONENT_HORIZONTAL_ARROW_POSITION, COMPONENT_INSTRUCTION_BACKGROUND_COLOR, COMPONENT_INSTRUCTION_TEXT, COMPONENT_INSTRUCTION_TEXT_ATTRIBUTES, COMPONENT_INSTRUCTION_TEXT_COLOR, COMPONENT_INSTRUCTION_TEXT_FONT_FACE, COMPONENT_INSTRUCTION_TEXT_SIZE, COMPONENT_MOUSE_FINGER_POSITION, COMPONENT_SOUND, COMPONENT_SOUND_IS_PLAYING, COMPONENT_SOUND_QUIT, COMPONENT_TIMER, COMPONENT_VERTICAL_ARROW_POSITION, DIALOG, HIDE_BULLSEYE, LESSON_STOP_ACTION, MOUSE_BULLSEYE, MOUSE_FINGER_IMAGE, NO_TOKEN, PREVIOUS_TASK_COMPLETION_REASON, PROGRESS_PANEL_VISIBLITY, SHOW_BULLSEYE, SKIP_TASK_ACTION, TAL_DIALOG, TASK_FAIL_COUNT, TASK_STATUS, TASK_SUCCEED_COUNT, YES_TOKEN
 
Fields inherited from interface tal.TalConstants
ADD_PICTURE, ARROW_POSITION, BOTTOM_OUT, BUDDY_IS_VISIBILE, BUTTON_LOGOUT, COMPOSER, COMPOSER_BUTTON_DONT, COMPOSER_BUTTON_SEND, COMPOSER_CAPTION, COMPOSER_GRAY, COMPOSER_SCROLL_BUTTON_BOTTOM, COMPOSER_SCROLL_BUTTON_TOP, COMPOSER_SCROLL_TO_BOTTOM, COMPOSER_SCROLL_TO_TOP, COMPOSER_SCROLLBAR, COMPOSER_STATE, COMPOSER_SUBJECT, COMPOSER_TEXT, COMPOSER_TEXT_IS_VISIBILE, IMAGE_DIR, INBOX, INBOX_BUDDY, INBOX_BUDDY_BUTTON, INBOX_BUDDY_BUTTON_NEW, INBOX_BUDDY_BUTTON_OLD, INBOX_BUDDY_BUTTON_PIC, INBOX_BUDDY_FILE, INBOX_BUDDY_HIGHLIGHT, INBOX_BUDDY_MAIL, INBOX_BUDDY_NAME, INBOX_GRAY, INBOX_SCROLL_BUTTON_BOTTOM, INBOX_SCROLL_BUTTON_TOP, INBOX_SCROLL_TO_BOTTOM, INBOX_SCROLL_TO_TOP, INBOX_SCROLLBAR, INBOX_STATE, PICTURE_IS_VISIBILE, PICTURE_READER, READER, READER_BUTTON_DELETE, READER_BUTTON_REPLY, READER_BUTTON_SAVE, READER_CAPTION, READER_DATE, READER_GRAY, READER_SCROLL_BUTTON_BOTTOM, READER_SCROLL_BUTTON_TOP, READER_SCROLL_TO_BOTTOM, READER_SCROLL_TO_TOP, READER_SCROLLBAR, READER_STATE, READER_SUBJECT, READER_TEXT, READER_TEXT_IS_VISIBILE, SCROLL_BUTTON_DOWN, SCROLL_BUTTON_UP, SCROLLED_STATE, SENT_STATE, TAL_BUTTON, TAL_STATE, TIME
 
Fields inherited from interface keyboard.KeyboardConstants
BACK, BOTTOM, BUTTON_COLOR, BUTTON_COMMAND, BUTTON_TEXT, BUTTON_TEXT_ATTRIBUTES, BUTTON_TEXT_COLOR, BUTTON_TEXT_FONT_FACE, BUTTON_TEXT_SIZE, DELAY, DOWN, END, END_OF_LINE, ERROR_DETECTED, FINGER, FIRST, FRONT, HOME, INSTRUCTION_POSITION_TO_COORDS, KEYMAP, KEYMAP_COORDS_TO_PANEL_COORDS, LAST, LEFT, NO_BEEP, NO_DELETE, NO_ERROR, NO_WRAP, PAGE_DOWN, PAGE_UP, POSITION, PRESS, RIGHT, SPEED, START_OF_LINE, STRICT, TARGET_BACKGROUND_COLOR, TARGET_HIGHLIGHT, TARGET_HIGHLIGHT_CIRCLE_COLOR, TARGET_HIGHLIGHT_COLOR, TARGET_HIGHLIGHT_TEXT_COLOR, TARGET_POSITION_TO_COORDS, TARGET_TEXT, TARGET_TEXT_ATTRIBUTES, TARGET_TEXT_COLOR, TARGET_TEXT_FONT_FACE, TARGET_TEXT_SIZE, TOP, UP, USER_BACKGROUND_COLOR, USER_CARET, USER_CARET_BLINK_RATE, USER_CARET_COLOR, USER_CARET_HIGHLIGHT_COLOR, USER_CARET_WIDTH, USER_HIGHLIGHT, USER_HIGHLIGHT_CIRCLE_COLOR, USER_HIGHLIGHT_COLOR, USER_HIGHLIGHT_TEXT_COLOR, USER_POSITION_ABOVE, USER_POSITION_BELOW, USER_POSITION_TO_COORDS, USER_TEXT, USER_TEXT_ATTRIBUTES, USER_TEXT_COLOR, USER_TEXT_FONT_FACE, USER_TEXT_SIZE
 
Fields inherited from interface util.SettingsConstants
ALTERNATIVE_BACKGROUND_COLOR, ALTERNATIVE_BACKGROUND_COLOR_ALIAS, ALTERNATIVE_FONT_ATTRIBUTES, ALTERNATIVE_FONT_ATTRIBUTES_ALIAS, ALTERNATIVE_FONT_COLOR, ALTERNATIVE_FONT_COLOR_ALIAS, CARET_BLINK_RATE, CARET_COLOR, CARET_WIDTH, DECORATED, DEFAULT_UI_STATE_CLASS, FONT_FACE, FONT_FACE_ALIAS, FONT_SIZE, FONT_SIZE_ALIAS, INNER_BACKGROUND_COLOR, INSTRUCTION_BACKGROUND_COLOR, INSTRUCTION_BACKGROUND_COLOR_ALIAS, INSTRUCTION_FONT_ATTRIBUTES, INSTRUCTION_FONT_ATTRIBUTES_ALIAS, INSTRUCTION_FONT_COLOR, INSTRUCTION_FONT_COLOR_ALIAS, LARGE_FONT_SIZE, LARGE_FONT_SIZE_ALIAS, LESSON_UI_STATE_CLASS, LOGGER_CLASS, LOGGER_DIRECTORY, LOGGER_PARAMS, SAVE_FILENAME, SCREEN_PERCENT, SKILL_LATTICE_FILENAME, SMALL_FONT_SIZE, SMALL_FONT_SIZE_ALIAS, STATS_FILENAME, TAL_SETTINGS_FILENAME, TITLE, TITLE_ALIAS, TITLE_ICON, TITLE_ICON_ALIAS, TRAINER_UI_STATE_CLASS, USER_ID
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TalPanel(TrainingDesktop dt)
           
 
Method Summary
protected  TrainingPanel.KeyValue[] getMonitoredKeys()
          Returns the array of monitored keys.
protected  java.lang.String[] getQueryKeys()
          Returns the array of query keys.
 void initialize(TrainingDesktop desktop)
           
protected  java.lang.String query(java.lang.String key)
          This allows the constraints to ask for a property of the panel.
 TaskProperties reset()
          Clears the interface and returns a new TaskProperties object.
protected  void TaskPropertyChanged(java.lang.String key, java.lang.String value)
          This method is called to indicate that a monitored value has changed.
 
Methods inherited from class desktop.TrainingPanel
addActionListener, getDesktop, getResetProperties, getSettings, getTaskProperties, parseCoords, removeActionListener
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name of this component.

See Also:
Constant Field Values

INSTRUCTION_LABEL

public static final java.lang.String INSTRUCTION_LABEL
The name of this component.

See Also:
Constant Field Values
Constructor Detail

TalPanel

public TalPanel(TrainingDesktop dt)
Method Detail

initialize

public void initialize(TrainingDesktop desktop)

TaskPropertyChanged

protected void TaskPropertyChanged(java.lang.String key,
                                   java.lang.String value)
This method is called to indicate that a monitored value has changed. Presumeably, the value is being monitored so that this TrainingPanel can make some visual change. Implementors must be sure that such changes are done in a thread-safe manner, using the AWT Event Queue.

Specified by:
TaskPropertyChanged in class TrainingPanel

getMonitoredKeys

protected TrainingPanel.KeyValue[] getMonitoredKeys()
Returns the array of monitored keys.

Specified by:
getMonitoredKeys in class TrainingPanel

getQueryKeys

protected java.lang.String[] getQueryKeys()
Description copied from class: TrainingPanel
Returns the array of query keys. Query keys are used as keys in the TaskPropertyMap, but the value returned from the get method is computed using the query method, rather than looked up in the map itself.

Specified by:
getQueryKeys in class TrainingPanel

query

protected java.lang.String query(java.lang.String key)
Description copied from class: TrainingPanel
This allows the constraints to ask for a property of the panel. To the constraint, it appears that these are normal task properties keys, but when the TaskPropertyMap is asked for the value of a query key, it calls this method rather than looking up the saved information. Query keys are actually prefix strings. So, for example, a contraint may call taskProperties.get(CHAR_AT + "0 0") assuming CHAR_AT is a query key to specify the location (0, 0). Since the match is just a prefix match, care must be taken to create a unique string that does not appear as a prefix for some other key.

Specified by:
query in class TrainingPanel

reset

public TaskProperties reset()
Clears the interface and returns a new TaskProperties object. Need to make sure to remove all buddies.

Specified by:
reset in interface TrainingComponent
Overrides:
reset in class TrainingPanel

talx x1.0.5

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