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, enabledFields 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 voidprotected ConsoleAttempts to return the console where theActionEventoriginated.Methods inherited from class javax.swing.text.TextAction
augmentList, getFocusedComponent, getTextComponentMethods 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 theActionEventoriginated.Note:
TextActions 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 ofJTextPanes toConsoles.- Parameters:
e- The action whose sourceConsoleyou want.- Returns:
- Either the actual source
Console, or theConsoleprovided to the constructor. - See Also:
-
actionPerformed
-