com.swabunga.spell.event
public interface SpellCheckEvent
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(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 |
String | getInvalidWord() Returns the currently misspelt word |
String | getReplaceWord() Returns the text to replace |
List | getSuggestions() Returns the list of suggested Word objects |
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(String newWord, boolean replaceAll) Set the action to replace the currently misspelt word with the new word |
Parameters: newWord The new word to add
Returns: The type of action the event is carrying
Returns: The text misspelt
Returns: the text of the word to replace
Returns: A list of words phonetically close to the misspelt word
Returns: The text containing the context
Returns: The position of the word
Parameters: ignoreAll If set to true, the SpellChecker will replace all further occurrences of the misspelt word without firing a SpellCheckEvent.
Parameters: newWord The word to replace the currently misspelt word replaceAll If set to true, the SpellChecker will replace all further occurrences of the misspelt word without firing a SpellCheckEvent.