edu.wisc.ssec.mcidasv.jython
Class ConsoleAction
java.lang.Object
javax.swing.AbstractAction
javax.swing.text.TextAction
edu.wisc.ssec.mcidasv.jython.ConsoleAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- DeleteAction, DownAction, EndAction, EnterAction, HomeAction, PasteAction, TabAction, UpAction
public abstract class ConsoleAction
- extends TextAction
- See Also:
- Serialized Form
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 |
mapping
protected static final Map<JTextPane,Console> mapping
console
protected Console console
ConsoleAction
protected ConsoleAction(Console console,
Console.Actions type)
getSourceConsole
protected Console getSourceConsole(ActionEvent e)
- Attempts to return the console where the
ActionEvent
originated.
Note: TextAction
s are weird. The only
somewhat-accurate way to determine where the action occurred is to check
EventObject.getSource()
. Since that will be a JTextPane
,
you have to keep an updated mapping of JTextPane
s to Console
s.
- Parameters:
e
- The action whose source Console
you want.
- Returns:
- Either the actual source
Console
, or the Console
provided to the constructor. - See Also:
TextAction
actionPerformed
public abstract void actionPerformed(ActionEvent e)