public abstract class ConsoleAction extends javax.swing.text.TextAction
| Modifier and Type | Field and Description |
|---|---|
protected Console |
console |
protected static java.util.Map<javax.swing.JTextPane,Console> |
mapping |
| Modifier | Constructor and Description |
|---|---|
protected |
ConsoleAction(Console console,
Console.Actions type) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
actionPerformed(java.awt.event.ActionEvent e) |
protected Console |
getSourceConsole(java.awt.event.ActionEvent e)
Attempts to return the console where the
ActionEvent originated. |
augmentList, getFocusedComponent, getTextComponentprotected ConsoleAction(Console console, Console.Actions type)
protected Console getSourceConsole(java.awt.event.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(java.awt.event.ActionEvent e)