public class FittsTask extends javax.swing.JFrame implements java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.ActionListener, java.awt.event.KeyListener
The default parameter settings are read from FittsTask.cfg but may be changed through the setup dialog for the current invocation. Changes may be saved by clicking the "Save" button (see above).
The setup parameters are as follows:
Parameter Description Participant code Identifies the current participant. This is used in forming the names for the output data files. Also, the output data files include a column with the participant code. (The same is true for the next four setup parameters.)
Condition code An arbitrary code to associate a test condition with a block of trials. This parameter might be useful when testing a condition that is not inherently part of the application. For example, if the software is used to compare a mouse, touchpad, and joystick, the mouse condition could be "C01", the touchpad condition "C02", and the joystick condition "C03".
Session code Identifies the session. This code is used if testing proceeds over multiple sessions to gauge the progression of learning.
Group code Identifies the group to which the participant was assigned. This code is useful if counterbalancing is used to offset order effects for a within-subjects independent variable. In this case, participants are divided into group and each group is given the conditions in a different order. The group code identifies the group.
NOTE: There is no setup parameter for "Block code" . The block code is generated automatically. For any given set of conditions, the first block of testing is "B01", the second is "B02", and so on. Output data files include the block code in the filename and in a column of the data. The first available block code is used in opening data files for output. This prevents overwriting data from an earlier block of testing.
Task type Radio buttons to select either the one-dimensional (1D) or two-dimensional (2D) task.
Selection method Specifies the method of target selection for each trial. The options are
- Mouse button (MB) – a target selection occurs by pressing and releasing the primary mouse button. This is the default selection method.
- Dwell time (DTn) – a target is selected when the mouse cursor enters the target and remains in the target for n milliseconds (see below).
- Keyboard (KB) – a target selection occurs by pressing and releasing either the "F" or "J" key on the system keyboard.
Note: When using dwell time selection, errors are not possible since selection only occurs when the cursor is inside the target.
Dwell time This setup parameter only applies when using dwell-time selection (see above). In this case, target selection occurs after the cursor is inside the target for the specified time. The combobox options range from 0 ms to 2000 ms in 100-ms increments.
During the dwell interval, the dwell progression is shown using a rotating arc as visual feedback. The arc appears inside the target and advances around the target, completing a full rotation at the end of the dwell interval. See below.
The colour of the arc is set by the "mouse-over" colour button at the bottom of the Setup dialog.
Note: Setting dwell time to 0 ms is a special case for dwell-time selection. With zero dwell time, selection occurs immediately when the cursor first enters the target. Thus, the dwell timer is not used and there is no visual feedback for the dwell progression.
Minimum dwell arc size This setup parameter only applies when using dwell-time selection (see above). The nominal size of the dwell arc is the target width, as seen in the images above. The size of the dwell arc may be increased for small targets using this option. This might be necessary when occlusion is an issue, for example, with finger input.
The first value in the combobox is the default ( "Target width"). Additional values range from 20 pixels to 200 pixels, in 20-pixel increments. As an example, if this option is set to 80 pixels and the targets are 40 pixels wide, then the following extended arc appears outside the target:
The extended arc colour is slightly lighter than the inside arc colour.
Number of Trials (1D) or Targets (2D) An integer value that specifies either the number of trials (1D) or the number of targets (2D).
Only odd numbers are supported. This is primarily a consideration for 2D tasks. Using an odd number ensures that the distance between successive targets is the same for each trial. This distance is a bit less than the specified amplitude, which is the diameter of the layout circle.
Target amplitudes Target amplitude (A) is either the horizontal distance between target centres (1D) or the diameter of the layout circle (2D). The units are pixels.
Multiple amplitudes may be specified using a comma delimiter.
Target widths Target width (W) is either the width of the target rectangles (1D) or the diameter of the target circles (2D). The units are pixels.
Multiple widths may be specified using a comma delimiter.
Note: A "block" of testing covers all combinations of A and W. A "sequence" refers to a series of trials for one A-W condition. If there are m amplitudes and n widths, the block contains m × n sequences.
Error threshold Specifies an error threshold (%) above which a sequence of trials is deemed an outlier. In this case, the sequence is repeated. A value of 100 effective disables this feature.
Note: Data are not saved for an outlier sequence. However, the sd2 output file includes a data column for the sequence repeat count ("SRC") for each A-W condition. Usually (hopefully!) SRC is zero.
Spatial hysteresis Spatial hysteresis (SH) is a scaling factor to create a larger virtual target – a hysteresis zone – to improve target selection. The mouse pointer is deemed to enter the target when it enters the "real target". The pointer is deemed to exit the target when the pointer exits the hysteresis zone.
With SH = 2.0, for example, the hysteresis zone has 2× the width of the real target. The default value of 1.0 essentially disables this feature.
The idea of spatial hysteresis has not been tested experimentally. It is simply an idea to improve selection for small targets when there is limited space available between the targets. If anyone is interested in testing this idea experimentally, please let me know (Scott MacKenzie, mack "at" cse.yorku.ca).
Randomize target conditions A checkbox item. If checked, a random-without-replacement algorithm is used to select the A-W condition for each sequence in a block.
Show marker at center of target A checkbox item. If checked, a marker ("+") is shown at the center of the target. Below is an example of a target with a marker (left) and without a marker (right).
Including a marker might be useful if targets are selected using gaze selection with an eye tracking apparatus. In this case, participants have a clear fixation point at the center of the target. Even for input using a mouse or other pointing device, it might be useful to include a marker. What is the participant's task? Is the participant required simply to select anywhere within the target, or should the participant strive to select the center of the target? What is effect of these two strategies on throughput?
Use target image A checkbox item. If checked, an image is used for the target. This option only applies to 2D tasks. The default image is a ball in the file
targetImage.gif. Change this to an image of your own choosing, if desired.
Auditory feedback A checkbox item. If checked, a "tick" auditory sound is emitted upon target selection. A "beep" is emitted if a selection is in error (i.e., outside the target on button-up).
Button-down highlight A checkbox item. If checked, uses a different target colour when the mouse button is down (and the cursor is above a target).
Mouse-over highlight A checkbox item. If checked, uses a different target colour when the cursor is above a target.
Colors Five buttons that launch color choosers to set the colors for the display.
The user begins a sequence of trials by clicking on the highlighted target. For the 1D task, the highlight moves back and forth between targets until the specified number of trials are completed. For the 2D task, the highlight moves to a target on the opposite side of the layout circle. Clicking continues in an opposing pattern rotating around the layout circle until all targets are selected. A sequence is finished when the first target is again highlighted and selected.
Timing begins on button-up of the first click and continues to button-up on the last click.
Errors are permitted. The only exception is that the initial click to start a sequence of trials must be inside the first highlighted target.
At the end of a sequence of trials, a popup window appears showing results for the sequence ("Sequence Summary"):
After the last sequence of trials in a block, a popup window appears showing the overall results for the block ( "Block Summary"):
"FittsTask" - application identifier Participant code - from setup dialog Condition code - from setup dialog Session code - from setup dialog Group code - from setup dialog Task type - 1D or 2D Selection method - MB, DTn, KB (Note: "n" is the dwell time) Block code - generated automatically Trial - trial number A - amplitude (distance to target in pixels) W - width (diameter of target in pixels) Ae - effective amplitude (pixels; see below) dx - delta x (pixels; see below) PT - pointing time (ms) ST - selection time (ms) - the time the button is down MT - movement time (ms) - Note: MT = PT + ST Error - 0 = hit, 1 = miss TRE - target re-entries TAC - task axis crossings MDC - movement direction changes ODC - orthogonal direction changes MV - movement variability ME - movement error MO - movement offsetThe first seven entries are settings from the Setup dialog. The next entry,
Block code, is generated automatically as the next available block code in the filenames. The next three entries (
W) are the task conditions. The next six (
Error) are measures of the participant's performance for each trial.
Ae is the effective amplitude – the actual cursor distance projected on the task axis.
A for undershoots and
A for overshoots.
dx is the delta x of the selection coordinates. It is normalized relative to the center of the
target and to the task axis. For example,
dx = 1 is the equivalent of a one-pixel overshoot while
dx = −1 is the equivalent of a one-pixel undershoot. Note that
dx = 0 does not mean
selection was precisely at the centre of the target. It means selection was on the line orthogonal to the task axis
going through the centre of the target. This is consistent with the inherently one-dimensional nature of Fitts' law.
The last seven measures (
MO) capture accuracy characteristics of the cursor path during a trial. These measures
are fully described in Accuracy Measures for Evaluating Computer
Pointing Devices by MacKenzie, Kauppinen, and Silfverberg (2001). See as well the
API for the
"FittsTask" - application identifier Participant code - from setup dialog Condition code - from setup dialog Session code - from setup dialog Group code - from setup dialog Task type - 1D or 2D Selection method - MB, DTn, KB (Note: "n" is the dwell time) Block code - from setup dialog SRC - sequence repeat count Trials - number of trials in this sequence A - target amplitude (pixels) W - target width (diameter) (pixels) ID - index of difficulty (bits) Ae - effective target amplitude (pixels) We - effective target width (pixels) IDe - effective index of difficulty (bits) PT - pointing time (ms) ST - selection time (ms) MT - movement time (ms) ER - error rate (%) TP - throughput (bits/s) TRE - target re-entries TAC - task axis crossings MDC - movement direction changes ODC - orthogonal direction changes MV - movement variability ME - movement error MO - movement offsetThe first seven entries are settings from the Setup dialog. The next entry,
Block code, is generate automatically as the next available block code in the filenames. The next entry is
SRC(sequence repeat count), which is the number of times the sequence was repeated due the error threshold being exceeded. The next four entries (
ID) are the task conditions.
The remaining entries are measures of participant behaviour, computed over a sequence of trials for the specified A-W condition. All the values, except TP, are means, computed over the trials in the sequence.
TP is the Fitts' law throughput, in bits/s, computed over the sequence of trials. The calculation of TP uses the dx values in the sd1 file (see above). The standard deviation in the dx values for all trials in a sequence is SD x . This is used in the calculation of throughput as follows:
We = 4.133 × SDxThe actual calculation is performed using the
IDe = log2(Ae / W e + 1)
TP = IDe / MT
Throughputclass. Consult the API for complete details.
The following are examples of "sd" (summary data) files:
Actual output files use "FittsTask" as the base filename. This is followed by the participant code, the condition
code, the sequence code, the group code, the task type, the selection method, and the block code, for example,
In most cases, the sd2 data files are the primary files for analyses in an experimental evaluation. The data in the sd2 files are full-precision, comma-delimited, to facilitate importing into a spreadsheet or statistics application. Below is an example for the sd2 file above, after importing into Microsoft Excel: (click to enlarge)
|Modifier and Type||Class and Description|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
|Modifier and Type||Method and Description|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public void keyPressed(java.awt.event.KeyEvent ke)
public void keyReleased(java.awt.event.KeyEvent ke)
public void keyTyped(java.awt.event.KeyEvent ke)
public void actionPerformed(java.awt.event.ActionEvent e)
public void mouseDragged(java.awt.event.MouseEvent me)
public void mouseMoved(java.awt.event.MouseEvent me)
public void mouseClicked(java.awt.event.MouseEvent me)
public void mouseEntered(java.awt.event.MouseEvent me)
public void mouseExited(java.awt.event.MouseEvent me)
public void mousePressed(java.awt.event.MouseEvent me)
public void mouseReleased(java.awt.event.MouseEvent me)
public javax.sound.sampled.Clip initSound(java.lang.String soundFile)
public void playSound(javax.sound.sampled.Clip c)