WordFinder
SynchronizedWordFinder
public class DocumentWordFinder extends CharSequenceWordFinder
Modifier | Constructor | Description |
---|---|---|
|
DocumentWordFinder() |
|
protected |
DocumentWordFinder(java.lang.CharSequence text,
WordTokenizer tokenizer) |
|
|
DocumentWordFinder(javax.swing.text.Document text) |
|
|
DocumentWordFinder(javax.swing.text.Document text,
WordTokenizer tokenizer) |
|
|
DocumentWordFinder(WordTokenizer tokenizer) |
Modifier and Type | Method | Description |
---|---|---|
javax.swing.text.Document |
getDocument() |
|
DocumentCharSequence |
getDocumentCharSequence() |
|
Word |
getNextWord(int index) |
|
Word |
getPreviousWord(int index) |
|
Word |
getWordAt(int index) |
|
void |
quitDocument() |
|
protected void |
replace(java.lang.String newWord,
Word currentWord) |
This method throw a UnsupportedOperationException because a String is
inmutable object.
|
void |
setDocument(javax.swing.text.Document document) |
current, hasCurrent, hasNext, init, init, next, replace
getCharSequence, getTokenizer, next, setTokenizer, updateCharSequence
public DocumentWordFinder(WordTokenizer tokenizer)
public DocumentWordFinder()
public DocumentWordFinder(javax.swing.text.Document text, WordTokenizer tokenizer)
protected DocumentWordFinder(java.lang.CharSequence text, WordTokenizer tokenizer)
public DocumentWordFinder(javax.swing.text.Document text)
text
- protected void replace(java.lang.String newWord, Word currentWord)
CharSequenceWordFinder
replace
in class CharSequenceWordFinder
newWord
- The new string for the current word.currentWord
- The current word.public Word getWordAt(int index)
public Word getPreviousWord(int index)
public Word getNextWord(int index)
public void setDocument(javax.swing.text.Document document)
public void quitDocument()
public DocumentCharSequence getDocumentCharSequence()
public javax.swing.text.Document getDocument()