|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
javax.swing.text.TextAction
org.fife.ui.rtextarea.RecordableTextAction
public abstract class RecordableTextAction
The base action used by the actions defined in
RTextAreaEditorKit. This action is what allows instances of
RTextArea to record keystrokes into "macros;" if an action is
recordable and occurs while the user is recording a macro, it adds itself to
the currently-being-recorded macro.
| Field Summary |
|---|
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields 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 | |
|---|---|
RecordableTextAction(String text)
Constructor. |
|
RecordableTextAction(String text,
Icon icon,
String desc,
Integer mnemonic,
KeyStroke accelerator)
Constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
This method is final so that you cannot override it and mess up the macro-recording part of it. |
abstract void |
actionPerformedImpl(ActionEvent e,
RTextArea textArea)
The actual meat of the action. |
KeyStroke |
getAccelerator()
Returns the accelerator for this action. |
String |
getDescription()
Returns the description for this action. |
Icon |
getIcon()
Returns the icon for this action. |
abstract String |
getMacroID()
Returns the identifier for this macro. |
int |
getMnemonic()
Returns the mnemonic for this action. |
String |
getName()
Returns the name of this action. |
boolean |
isRecordable()
Returns whether or not this action will be recorded and replayed in a macro. |
void |
setMnemonic(Integer mnemonic)
Sets the mnemonic for this action. |
void |
setRecordable(boolean recordable)
Sets whether or not this action will be recorded and replayed in a macro. |
| Methods inherited from class javax.swing.text.TextAction |
|---|
augmentList, getFocusedComponent, getTextComponent |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecordableTextAction(String text)
text - The text (name) associated with the action.
public RecordableTextAction(String text,
Icon icon,
String desc,
Integer mnemonic,
KeyStroke accelerator)
text - The text (name) associated with the action.icon - The icon associated with the action.desc - The description of the action.mnemonic - The mnemonic for the action.accelerator - The accelerator key for the action.| Method Detail |
|---|
public final void actionPerformed(ActionEvent e)
actionPerformedImpl.
e - The action being performed.actionPerformedImpl(java.awt.event.ActionEvent, org.fife.ui.rtextarea.RTextArea)
public abstract void actionPerformedImpl(ActionEvent e,
RTextArea textArea)
e - The action being performed.textArea - The text area "receiving" the action.actionPerformed(java.awt.event.ActionEvent)public KeyStroke getAccelerator()
public String getDescription()
public Icon getIcon()
public abstract String getMacroID()
RTextAreaEditorKit.CutAction
action, for example, rename it to "Remove", and it will still be
recorded as a "cut" action. Subclasses should return a unique string
from this method; preferably the name of the action.
If you subclass a RecordableTextAction, you should NOT
override this method; if you do, the action may not be properly
recorded in a macro.
public int getMnemonic()
-1 if not defined.setMnemonic(Integer)public String getName()
public boolean isRecordable()
setRecordable(boolean)public void setMnemonic(Integer mnemonic)
mnemonic - The new mnemonic.getMnemonic()public void setRecordable(boolean recordable)
recordable - Whether or not this action should be recorded
and replayed.isRecordable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||