public class SpellChecker extends AbstractRichTextSpellChecker implements com.swabunga.spell.event.SpellCheckListener
RichTextArea. Acts as a decorator
around a SpellChecker from the jazzy library.
Copyright 2006 Sans Pareil Technologies, Inc.
RichTextSpellChecker.SpellCheckerWord| Modifier and Type | Method and Description |
|---|---|
String[] |
checkWord(String word)
Check the specified word and return
null or an array of
alternative words. |
static SpellChecker |
getInstance(Locale[] locales,
String directory)
Return the instance for the specified locales.
|
void |
spellingError(com.swabunga.spell.event.SpellCheckEvent event)
Implementation of the
SpellCheckListner interface. |
parseWordspublic static SpellChecker getInstance(Locale[] locales, String directory) throws IOException
locales - The locales specified by the client.directory - The directory in which the dictionary files are stored.IOException - If errors are encountered while attempting to
read the dictionary files.loadDictionary(java.util.Locale, java.lang.String)public String[] checkWord(String word)
null or an array of
alternative words.checkWord in interface RichTextSpellCheckerRichTextSpellChecker, this method
returns null if the word is spelt properly, or an
array of words that are alternatives (empty if no alternatives are
known).public void spellingError(com.swabunga.spell.event.SpellCheckEvent event)
SpellCheckListner interface.
Populates the suggestions with the suggestions available
in the event.spellingError in interface com.swabunga.spell.event.SpellCheckListenerevent - The spell check event.