|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
ch.unizh.ini.friend.gui.StimulusAction
public abstract class StimulusAction
Actions that can happen to the stimulus. Use these classes in a GUI by simply adding a new action to a menu, e.g.:
Stimulus stimulus; // defined earlier menu.add(new StimulusAction.Rotate(stimulus);The
ActionListener.actionPerformed(java.awt.event.ActionEvent)
method will be called automagically when the menu item is selected.
Nested Class Summary | |
---|---|
static class |
StimulusAction.Brighten
brightens the stimulus |
static class |
StimulusAction.BrightenBackground
brightens background |
static class |
StimulusAction.Darken
darkens the stimulus |
static class |
StimulusAction.DarkenBackground
darkens background |
static class |
StimulusAction.FlipContrast
Swaps foreground and background brightnesses. |
static class |
StimulusAction.Rotate
rotates the stimulus. |
Field Summary | |
---|---|
protected static String |
brighten
name of action that can happen to Stimulus |
protected static String |
brightenBackground
name of action that can happen to Stimulus |
protected static String |
darken
name of action that can happen to Stimulus |
protected static String |
darkenBackground
name of action that can happen to Stimulus |
protected static String |
flipContrast
name of action that can happen to Stimulus |
protected static String |
rotate
name of action that can happen to Stimulus |
protected Stimulus |
stimulus
the stimulus |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
protected |
StimulusAction()
Creates a new instance of StimulusAction |
protected |
StimulusAction(String name)
|
protected |
StimulusAction(String name,
Icon icon)
|
Method Summary |
---|
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
protected static final String rotate
protected static final String brighten
protected static final String darken
protected static final String brightenBackground
protected static final String darkenBackground
protected static final String flipContrast
protected Stimulus stimulus
Constructor Detail |
---|
protected StimulusAction()
protected StimulusAction(String name)
protected StimulusAction(String name, Icon icon)
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |