|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This event is fired off by the SpellChecker and is passed to the registered SpellCheckListeners
AFAIK we will only require one implementation of the SpellCheckEvent (BasicSpellCheckEvent) but I have defnied 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 spellchecker. |
short |
getAction()
|
java.lang.String |
getInvalidWord()
Returns the currently misspelt word |
java.lang.String |
getReplaceWord()
|
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 |
public static final short IGNORE
public static final short IGNOREALL
public static final short REPLACE
public static final short REPLACEALL
public static final short ADDTODICT
public static final short CANCEL
public static final short INITIAL
Method Detail |
public java.util.List getSuggestions()
public java.lang.String getInvalidWord()
public java.lang.String getWordContext()
public int getWordContextPosition()
public short getAction()
public java.lang.String getReplaceWord()
public 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 occurances of the misspelt word without firing a SpellCheckEvent.public void ignoreWord(boolean ignoreAll)
ignoreAll
- If set to true, the SpellChecker will replace all
further occurances of the misspelt word without firing a SpellCheckEvent.public void addToDictionary(java.lang.String newWord)
public void cancel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |