public class VisualStimulusGenerator
extends javax.swing.JFrame
implements java.awt.event.WindowListener
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
java.awt.Color |
backCol |
static int |
BlackToColor |
static int |
ColorDown |
static int |
ColorToBlack |
static int |
ColorToWhite |
static int |
ColorUp |
java.awt.Color |
foreCol |
float[] |
hsbVals |
float[] |
hsbVals_start |
Experiment |
itsExperiment |
long |
itsMilliSecWait |
java.util.Timer |
itsRampTimer |
int |
itsRampType |
int |
kHeight |
int |
kWidth |
static int |
WhiteToColor |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
Constructor and Description |
---|
VisualStimulusGenerator(Experiment theExperiment)
standard constructor for the VisualStimulusGenerator class
|
VisualStimulusGenerator(java.lang.String Title,
Experiment theExperiment)
standard constructor for the VisualStimulusGenerator class
|
Modifier and Type | Method and Description |
---|---|
void |
colorRamp(float[] startHSB,
int rampType,
int mSecsWait)
sets up the ramping of the color
|
java.util.TimerTask |
getRampBlackColorTimerTask() |
java.util.TimerTask |
getRampColorBlackTimerTask() |
java.util.TimerTask |
getRampColorDownTimerTask() |
java.util.TimerTask |
getRampColorUpTimerTask() |
java.util.TimerTask |
getRampColorWhiteTimerTask() |
java.util.TimerTask |
getRampWhiteColorTimerTask() |
void |
invalidTrial() |
static void |
main(java.lang.String[] args) |
void |
makeControlDialog() |
void |
paint(java.awt.Graphics g)
paint the frame
|
void |
paintFore(java.awt.Graphics g) |
void |
pauseRamp() |
void |
resumeBlackColorRamp() |
void |
resumeColorBlackRamp() |
void |
resumeColorRamp(boolean up) |
void |
resumeColorWhiteRamp() |
void |
resumeRamp() |
void |
resumeWhiteColorRamp() |
void |
setBackColor(java.awt.Color aCol) |
void |
setForeColor(java.awt.Color aCol) |
void |
stopRamp()
stops ramping the colors
|
void |
windowActivated(java.awt.event.WindowEvent e) |
void |
windowClosed(java.awt.event.WindowEvent e) |
void |
windowClosing(java.awt.event.WindowEvent e)
closing the window as part of the WindowListener interface
|
void |
windowDeactivated(java.awt.event.WindowEvent e) |
void |
windowDeiconified(java.awt.event.WindowEvent e) |
void |
windowIconified(java.awt.event.WindowEvent e) |
void |
windowOpened(java.awt.event.WindowEvent e) |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, 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, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, 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, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int BlackToColor
public static final int ColorToBlack
public static final int WhiteToColor
public static final int ColorToWhite
public static final int ColorUp
public static final int ColorDown
public int itsRampType
public Experiment itsExperiment
public int kWidth
public int kHeight
public java.awt.Color foreCol
public java.awt.Color backCol
public java.util.Timer itsRampTimer
public long itsMilliSecWait
public float[] hsbVals_start
public float[] hsbVals
public VisualStimulusGenerator(Experiment theExperiment)
theExperiment
- the experiment controlling the VisualStimulus generationpublic VisualStimulusGenerator(java.lang.String Title, Experiment theExperiment)
Title
- the title of the VisualStimulusGenerator windowtheExperiment
- the experiment controlling the VisualStimulus generationpublic void makeControlDialog()
public void setForeColor(java.awt.Color aCol)
public void setBackColor(java.awt.Color aCol)
public void pauseRamp()
public void resumeBlackColorRamp()
public void resumeColorBlackRamp()
public void resumeWhiteColorRamp()
public void resumeColorWhiteRamp()
public void resumeColorRamp(boolean up)
public void resumeRamp()
public void stopRamp()
public java.util.TimerTask getRampBlackColorTimerTask()
public java.util.TimerTask getRampColorBlackTimerTask()
public java.util.TimerTask getRampWhiteColorTimerTask()
public java.util.TimerTask getRampColorWhiteTimerTask()
public java.util.TimerTask getRampColorUpTimerTask()
public java.util.TimerTask getRampColorDownTimerTask()
public void invalidTrial() throws java.lang.Exception
java.lang.Exception
public void colorRamp(float[] startHSB, int rampType, int mSecsWait) throws java.lang.Exception
startHSB
- the Color to ramp torampType
- the type of ramp to usemSecsWait
- time to wait until increasing the brightness another notchjava.lang.Exception
- ...public void paint(java.awt.Graphics g)
paint
in class java.awt.Window
g
- the graphics portpublic void paintFore(java.awt.Graphics g)
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- the WindowEvent that is closing the windowpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public static void main(java.lang.String[] args)
RH, 2017