talx x1.0.5

mouse
Class MouseModelClickingPanel

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

public class MouseModelClickingPanel
extends TrainingPanel
implements ConstraintConstants, MouseConstants

Training panel that presents a grid of buttons.

See Also:
Serialized Form

Nested Class Summary
 class MouseModelClickingPanel.MouseGridButton
           
 class MouseModelClickingPanel.MouseGridButtonHolder
           
 class MouseModelClickingPanel.MouseGridButtonLink
           
 
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 GRID_COLOR
          Task properties key for the 24-bit RGB value for the color of the non-highlighted squares.
static java.lang.String GRID_SIZE
          Task properties key for space separated x and y dimensions of the mouse grid.
static java.lang.String HIGHLIGHT
          Task properties key for space separated x and y coordinates of the highlighted square in the mouse grid.
static java.lang.String HIGHLIGHT_COLOR
          Task properties key for the 24-bit RGB value for the color of the highlighted square.
static java.lang.String HIGHLIGHT_SCREEN_COORD
          Task properties key for the space separated x and y screen coordinates of the middle of the highlighted square in the mouse grid.
static java.lang.String INSTRUCTION_LABEL
          The name of this component.
static java.lang.String NAME
          The name of this component.
static java.lang.String TARGET
          The name of the target highlight button.
 
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 mouse.MouseConstants
DIRECTION, MOUSE_COORDS_TO_PANEL_COORDS, MOUSE_INSTRUCTION_COORDS, X, Y
 
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
MouseModelClickingPanel(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.
protected  java.lang.String query(java.lang.String key)
          This allows the constraints to ask for a property of the panel.
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, reset
 
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

TARGET

public static final java.lang.String TARGET
The name of the target highlight button.

See Also:
Constant Field Values

GRID_SIZE

public static final java.lang.String GRID_SIZE
Task properties key for space separated x and y dimensions of the mouse grid. The first value should be the total number of squares in the horizontal axis. The second value should be the total number of squares in the vertical axis.

See Also:
Constant Field Values

HIGHLIGHT

public static final java.lang.String HIGHLIGHT
Task properties key for space separated x and y coordinates of the highlighted square in the mouse grid. The first value should be the x coordinate. The second value should be the y coordinate. To turn highlighting off, set this to the empty string.

See Also:
Constant Field Values

HIGHLIGHT_COLOR

public static final java.lang.String HIGHLIGHT_COLOR
Task properties key for the 24-bit RGB value for the color of the highlighted square.

See Also:
Constant Field Values

GRID_COLOR

public static final java.lang.String GRID_COLOR
Task properties key for the 24-bit RGB value for the color of the non-highlighted squares.

See Also:
Constant Field Values

HIGHLIGHT_SCREEN_COORD

public static final java.lang.String HIGHLIGHT_SCREEN_COORD
Task properties key for the space separated x and y screen coordinates of the middle of the highlighted square in the mouse grid. The first value should be the x coordinate. The second value should be the y coordinate. If the highlight is off, this will return the empty string. This value is read-only. Attempts to change this value directly will result in no change. This value will change in response to changes in the HIGHLIGHT value.

See Also:
Constant Field Values
Constructor Detail

MouseModelClickingPanel

public MouseModelClickingPanel(TrainingDesktop dt)
Method Detail

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

talx x1.0.5

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