public abstract class ConsoleAction extends TextAction
| Modifier and Type | Field and Description |
|---|---|
protected Console |
console |
protected static Map<JTextPane,Console> |
mapping |
changeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Modifier | Constructor and Description |
|---|---|
protected |
ConsoleAction(Console console,
Console.Actions type) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
actionPerformed(ActionEvent e) |
protected Console |
getSourceConsole(ActionEvent e)
Attempts to return the console where the
ActionEvent originated. |
augmentList, getFocusedComponent, getTextComponentaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledprotected ConsoleAction(Console console, Console.Actions type)
protected Console getSourceConsole(ActionEvent e)
ActionEvent originated.
Note: TextActions 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 JTextPanes to Consoles.
e - The action whose source Console you want.Console, or the Console
provided to the constructor.TextActionpublic abstract void actionPerformed(ActionEvent e)