public interface SpellCheckEvent
Modifier and Type | Field and Description |
---|---|
static short |
ADDTODICT
Field indicating that the incorrect word should be added to the dictionary
|
static short |
CANCEL
Field indicating that the spell checking should be terminated
|
static short |
IGNORE
Field indicating that the incorrect word should be ignored
|
static short |
IGNOREALL
Field indicating that the incorrect word should be ignored forever
|
static short |
INITIAL
Initial case for the action
|
static short |
REPLACE
Field indicating that the incorrect word should be replaced
|
static short |
REPLACEALL
Field indicating that the incorrect word should be replaced always
|
Modifier and Type | Method and Description |
---|---|
void |
addToDictionary(java.lang.String newWord)
Set the action to add a new word into the dictionary.
|
void |
cancel()
Set the action to terminate processing of the spell checker.
|
short |
getAction()
Returns the action type the user has to handle
|
java.lang.String |
getInvalidWord()
Returns the currently misspelt word
|
java.lang.String |
getReplaceWord()
Returns the text to replace
|
java.util.List |
getSuggestions()
Returns the list of suggested Word objects
|
java.lang.String |
getWordContext()
Returns the context in which the misspelt word is used
|
int |
getWordContextPosition()
Returns the start position of the misspelt word in the context
|
void |
ignoreWord(boolean ignoreAll)
Set the action it ignore the currently misspelt word.
|
void |
replaceWord(java.lang.String newWord,
boolean replaceAll)
Set the action to replace the currently misspelt word with the new word
|
static final short IGNORE
static final short IGNOREALL
static final short REPLACE
static final short REPLACEALL
static final short ADDTODICT
static final short CANCEL
static final short INITIAL
java.util.List getSuggestions()
java.lang.String getInvalidWord()
java.lang.String getWordContext()
int getWordContextPosition()
short getAction()
java.lang.String getReplaceWord()
void replaceWord(java.lang.String newWord, boolean replaceAll)
newWord
- The word to replace the currently misspelt wordreplaceAll
- If set to true, the SpellChecker will replace all
further occurrences of the misspelt word without firing a SpellCheckEvent.void ignoreWord(boolean ignoreAll)
ignoreAll
- If set to true, the SpellChecker will replace all
further occurrences of the misspelt word without firing a SpellCheckEvent.void addToDictionary(java.lang.String newWord)
newWord
- The new word to addvoid cancel()