public class vsearch extends javax.swing.JPanel implements TestInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
vsearch.DesignContainer
Contains the trials included in this design.
|
static class |
vsearch.Trial
This class resembles one trial of the study experiment.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static int |
BOARDER_H
The boarder's height which tells how far from the edge the symbols are placed.
|
static int |
BOARDER_W
The boarder's width which tells how far from the edge the symbols are placed.
|
static int |
BREAK_INTERVAL
The amount of trials which is followed by a break window.
|
static java.lang.String[] |
colors
Different colors to use in test, default {"white","green"}
|
int |
currentTrial
The current trial number on going.
|
static boolean |
debug
Debugmode: false - no debug, true - debug
|
static vsearch.DesignContainer |
design
design is the object of DesignContainer and holds the information and functions to do the actual test.
|
static java.lang.String[] |
foils
Different kinds of foils to use in trials ie.
|
static boolean |
mClicksor
Takes care that mouse press won't piss on next window..
|
static int |
POINT_FINDER_LOOP_LOAD
How many times the algorithm tries to generate new point for each symbol.
|
int |
PRINT_BREAK
Sentence starting with PRINT_ tells what mode the test is currently doing.
if printMode is set to this the program draws break-text and waits till the user is ready. |
int |
PRINT_GREETING
Sentence starting with PRINT_ tells what mode the test is currently doing.
Print greeting is the mode when test starts and the greeting text is printed. |
int |
PRINT_OUTRO
Sentence starting with PRINT_ tells what mode the test is currently doing.
if printMode is set to this the program draws outro text to mark the end of the test. |
int |
PRINT_SEARCH_SET
Sentence starting with PRINT_ tells what mode the test is currently doing.
if printMode is set to this it brings the trial to be shown so that user can search target. |
int |
PRINT_SEARCH_TARGET
Sentence starting with PRINT_ tells what mode the test is currently doing.
If printMode is set to this the target will be shown for the user for a period of time to help him recognize what must be searched next. |
int |
PRINT_SEARCH_WAIT_REPLAY
Sentence starting with PRINT_ tells what mode the test is currently doing.
if printMode is set to this the program will wait until user chooses his answer from the circles. |
int |
printMode
This variable is the printMode which tells what phase the test is going through at the moment.
|
static int |
repeats
Amount of repeats in the design
|
static java.awt.Robot |
robot
Robot class for moving mouse to center without user's effort..
|
static int |
SCREEN_H
Screen height
|
static int |
SCREEN_W
Screen width
|
int |
SHOW_TARGET_WAIT_TIME
How long the target is shown in the middle of screen before the current actual trial is shown.
|
static int[] |
sizes
Different sizes of various trials.
|
static java.lang.String |
subjectGuy
Holds the subject-number.
|
static java.lang.String[] |
targChars
Target characters ie.
|
static int[] |
targets
Amount of targets in trials.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
vsearch()
vSearch class construcor.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
distance(double x1,
double y1,
double x2,
double y2)
This function tells the distance between two points.
|
static int |
getRandomNumber(int range)
Generates a random number from given range.
|
static long |
getScreenTimeMs()
Returns the screentime which is the time past after resetScreenTime() was
called.
|
static long |
getTestTimeMs()
Returns the test time which is the time past after resetTestTime() was
called.
|
void |
ghostWriter(java.lang.String str,
int x,
int y,
int w,
int h,
java.awt.Graphics g)
Draws a text to screen into specified x,y position and the paragraph size
For example "Thank you for taking part in the study" inthe middle.
|
void |
paint(java.awt.Graphics g)
This function draws according the current situation of the test.
|
static void |
resetScreenTime()
Resets screen time.
|
static void |
resetTestTime()
Resets test time.
|
static void |
runTest(java.lang.String subjectNumber)
Nothing overwhelming..
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static boolean debug
public static int POINT_FINDER_LOOP_LOAD
public static int SCREEN_W
public static int SCREEN_H
public static int BOARDER_W
public static int BOARDER_H
public int PRINT_GREETING
printModepublic int PRINT_SEARCH_TARGET
printModepublic int PRINT_SEARCH_SET
printModepublic int PRINT_SEARCH_WAIT_REPLAY
printModepublic int PRINT_BREAK
printModepublic int PRINT_OUTRO
printModepublic int currentTrial
public int printMode
public static java.awt.Robot robot
public static boolean mClicksor
public static int repeats
public static java.lang.String[] targChars
public static java.lang.String[] colors
public static int[] sizes
public static int[] targets
public static java.lang.String[] foils
public static int BREAK_INTERVAL
public int SHOW_TARGET_WAIT_TIME
public static java.lang.String subjectGuy
public static vsearch.DesignContainer design
public vsearch()
MouseAdapterpublic static int getRandomNumber(int range)
range - which should be positive number ie. 100public static double distance(double x1,
double y1,
double x2,
double y2)
x1 - X-coordinate of point1 as double.y1 - Y-coordinate of point1 as double.x2 - X-coordinate of point2 as double.y2 - Y-coordinate of point2 as double.public static void runTest(java.lang.String subjectNumber)
subjectNumber - subject's individual numberThreadpublic static void resetScreenTime()
getScreenTimeMs(),
resetTestTime(),
getTestTimeMs()public static long getScreenTimeMs()
resetScreenTime(),
resetTestTime(),
getTestTimeMs()public static void resetTestTime()
getScreenTimeMs(),
resetScreenTime(),
getTestTimeMs()public static long getTestTimeMs()
resetScreenTime(),
resetTestTime(),
getScreenTimeMs()public void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentg - The Graphics to draw.printModepublic void ghostWriter(java.lang.String str,
int x,
int y,
int w,
int h,
java.awt.Graphics g)
str - String that contains the text to print.x - The starting X-position of text to print.y - The starting Y-position of text to print.w - The width of the area for printing.h - The heigth of the text-area.g - This holds the graphic-class where text is drawn.Graphics