|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpellCheckEvent
This event is fired off by the SpellChecker and is passed to the registered SpellCheckListeners
As far as I know, we will only require one implementation of the SpellCheckEvent (BasicSpellCheckEvent) but I have defined this interface just in case. The BasicSpellCheckEvent implementation is currently package private.
Field Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Field Detail |
---|
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
Method Detail |
---|
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |