|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
CustomDictionaryProvider | Interface to be implemented by an additional dictionary. |
LanguageChangeListener | A language change event gets fired whenever the language is changed. |
UserDictionaryProvider | Interface to be implemented by a user dictionary. |
Class Summary | |
---|---|
AddWordAction | |
CheckerListener | Is used from CheckerMenu and CheckerPopup to handle the user events. |
FileUserDictionary | This is a reference implementation of the interface UserDictionaryProvider . |
LanguageChangeEvent | This Event is used by LanguageChangeListener . |
PopupListener | Implement a MouseListener for Popup Event. |
SpellChecker | This class is the major class of the spell checker JOrtho (Java Orthography Checker). |
SpellCheckerOptions | This class contains some options for spell checking. |
WordIterator | A implementation of an Iterator which split a large text into lines. |
This package implements the spell checker JOrtho. With JOrtho is it possible very simple to check the orthography from any text in a JTextComponent. The SpellChecker class is the major class of the Spell Checker JOrtho (Java Orthography Checker). In the most cases this is the only class that you need to add spelling feature to your application. If you want support for a user dictionary that a user can add its own words then you must implements a UserDictionaryProvider. This UserDictionaryProvider must be register at first:
SpellChecker.setUserDictionaryProvider( new MyUserDictionaryProvider() );
After it you need to register your dictionaries one times. In standalone application
if your dictionaries are in the working directory then this can look like:
SpellChecker.registerDictionaries( new URL("file", null, ""), "en,de", "de" );
and in a applet like:
SpellChecker.registerDictionaries( getCodeBase(), "en,de", "en" );
After this you can register your text component that should have all spell checker feature (Highlighter. context menu, spelling dialog). This look like:
JTextPane text = new JTextPane();
SpellChecker.register( text );
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |