public static class RTextAreaEditorKit.DumbCompleteWordAction extends RecordableTextAction
Constructor and Description |
---|
RTextAreaEditorKit.DumbCompleteWordAction() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformedImpl(java.awt.event.ActionEvent e,
RTextArea textArea)
The actual meat of the action.
|
java.lang.String |
getMacroID()
Returns the identifier for this macro.
|
protected int |
getPreviousWord(RTextArea textArea,
int offs) |
protected int |
getWordEnd(RTextArea textArea,
int offs) |
protected int |
getWordStart(RTextArea textArea,
int offs) |
protected boolean |
isAcceptablePrefix(java.lang.String prefix)
Utilities.getWordStart() treats spans of whitespace and
single non-letter chars as "words." This method is used to filter
that kind of thing out - non-words should not be suggested by this
action. |
actionPerformed, getAccelerator, getDescription, getIcon, getMnemonic, getName, isRecordable, setAccelerator, setMnemonic, setMnemonic, setName, setProperties, setRecordable, setShortDescription
augmentList, getFocusedComponent, getTextComponent
public RTextAreaEditorKit.DumbCompleteWordAction()
public void actionPerformedImpl(java.awt.event.ActionEvent e, RTextArea textArea)
RecordableTextAction
actionPerformedImpl
in class RecordableTextAction
e
- The action being performed.textArea
- The text area "receiving" the action.RecordableTextAction.actionPerformed(java.awt.event.ActionEvent)
public final java.lang.String getMacroID()
RecordableTextAction
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.
getMacroID
in class RecordableTextAction
protected int getPreviousWord(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
protected int getWordEnd(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
protected int getWordStart(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException
protected boolean isAcceptablePrefix(java.lang.String prefix)
Utilities.getWordStart()
treats spans of whitespace and
single non-letter chars as "words." This method is used to filter
that kind of thing out - non-words should not be suggested by this
action.prefix
- The prefix characters before the caret.