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 |
deinstall(javax.swing.JEditorPane editor) |
void |
install(javax.swing.JEditorPane editor,
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, getTextComponentaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic 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 install(javax.swing.JEditorPane editor,
Configuration config,
java.lang.String name)
SyntaxActioninstall in interface SyntaxActionconfig - the properties from which the action was constructedname - name of the action, (prefixed by Action.) will be obtained from the property Key as the
text following the Action.public void deinstall(javax.swing.JEditorPane editor)
deinstall in interface SyntaxActionpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic 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.Objectpublic final void setMenuText(java.lang.String text)
public final void setToolTip(java.lang.String text)
public final void setLargeIcon(java.lang.String url)
public final void setSmallIcon(java.lang.String url)