Package 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
- See Also:
-
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
protected Console
Attempts to return the console where theActionEvent
originated.Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponent
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
mapping
-
console
-
-
Constructor Details
-
ConsoleAction
-
-
Method Details
-
getSourceConsole
Attempts to return the console where theActionEvent
originated.Note:
TextAction
s are weird. The only somewhat-accurate way to determine where the action occurred is to checkEventObject.getSource()
. Since that will be aJTextPane
, you have to keep an updated mapping ofJTextPane
s toConsole
s.- Parameters:
e
- The action whose sourceConsole
you want.- Returns:
- Either the actual source
Console
, or theConsole
provided to the constructor. - See Also:
-
actionPerformed
-