public abstract class DefaultSyntaxAction extends javax.swing.text.TextAction implements SyntaxAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_PREFIX |
static java.lang.String |
LARGE_ICONS_LOC_PREFIX |
static java.lang.String |
SMALL_ICONS_LOC_PREFIX |
Constructor and Description |
---|
DefaultSyntaxAction(java.lang.String actionName) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
actionPerformed(javax.swing.text.JTextComponent target,
SyntaxDocument sDoc,
int dot,
java.awt.event.ActionEvent e)
Convenience method that will be called if the Action is performed on a
JTextComponent.
|
void |
config(Configuration config,
java.lang.String name)
Configure the actions in this class
|
void |
setLargeIcon(java.lang.String url)
Sets the Large Icon for this action from given url
|
void |
setMenuText(java.lang.String text)
Configure the MenuText for the Action
|
void |
setSmallIcon(java.lang.String url)
Configure the SmallIcon for the Action
|
void |
setToolTip(java.lang.String text)
Configure the ToolTip for the Action
|
java.lang.String |
toString() |
augmentList, getFocusedComponent, getTextComponent
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public static final java.lang.String ACTION_PREFIX
public static final java.lang.String SMALL_ICONS_LOC_PREFIX
public static final java.lang.String LARGE_ICONS_LOC_PREFIX
public void config(Configuration config, java.lang.String name)
SyntaxAction
config
in interface SyntaxAction
name
- Name of the action, (prefixed by Action.)
will be obtained from the property Key as the
text following the Action.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void actionPerformed(javax.swing.text.JTextComponent target, SyntaxDocument sDoc, int dot, java.awt.event.ActionEvent e)
target
- (non-null JTextComponent from Action.getSourcesDoc
- (SyntaxDOcument of the text component, could be null)dot
- (position of caret at text document)e
- actual ActionEvent passed to actionPerformedpublic java.lang.String toString()
toString
in class java.lang.Object
public final void setMenuText(java.lang.String text)
text
- public final void setToolTip(java.lang.String text)
text
- public final void setLargeIcon(java.lang.String url)
url
- public final void setSmallIcon(java.lang.String url)
url
-