public static class RTextAreaEditorKit.DumbCompleteWordAction extends RecordableTextAction
| Constructor and Description |
|---|
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, setShortDescriptionaugmentList, getFocusedComponent, getTextComponentpublic void actionPerformedImpl(java.awt.event.ActionEvent e,
RTextArea textArea)
RecordableTextActionactionPerformedImpl in class RecordableTextActione - The action being performed.textArea - The text area "receiving" the action.RecordableTextAction.actionPerformed(java.awt.event.ActionEvent)public final java.lang.String getMacroID()
RecordableTextActionRTextAreaEditorKit.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 RecordableTextActionprotected int getPreviousWord(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionprotected int getWordEnd(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionprotected int getWordStart(RTextArea textArea, int offs) throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionprotected 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.