com.swabunga.spell.swing
Class JTextComponentSpellChecker
java.lang.Object
com.swabunga.spell.swing.JTextComponentSpellChecker
public class JTextComponentSpellChecker
- extends java.lang.Object
This class spellchecks a JTextComponent throwing up a Dialog everytime
it encounters a misspelled word.
|
Method Summary |
void |
setUserDictionary(SpellDictionary dictionary)
Set user dictionary (used when a word is added) |
int |
spellCheck(javax.swing.text.JTextComponent textComp)
This method is called to check the spelling of a JTextComponent. |
void |
spellingError(SpellCheckEvent event)
|
void |
startAutoSpellCheck(javax.swing.JEditorPane pane)
|
void |
stopAutoSpellCheck(javax.swing.JEditorPane pane)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JTextComponentSpellChecker
public JTextComponentSpellChecker(SpellDictionary dict)
JTextComponentSpellChecker
public JTextComponentSpellChecker(java.lang.String dictFile,
java.lang.String title)
throws java.io.IOException
- Throws:
java.io.IOException
JTextComponentSpellChecker
public JTextComponentSpellChecker(java.lang.String dictFile,
java.lang.String phoneticFile,
java.lang.String title)
throws java.io.IOException
- Throws:
java.io.IOException
JTextComponentSpellChecker
public JTextComponentSpellChecker(SpellDictionary dict,
SpellDictionary userDict,
java.lang.String title)
setUserDictionary
public void setUserDictionary(SpellDictionary dictionary)
- Set user dictionary (used when a word is added)
spellCheck
public int spellCheck(javax.swing.text.JTextComponent textComp)
- This method is called to check the spelling of a JTextComponent.
- Parameters:
textComp - The JTextComponent to spellcheck.
- Returns:
- Either SpellChecker.SPELLCHECK_OK, SpellChecker.SPELLCHECK_CANCEL or the number of errors found. The number of errors are those that
are found BEFORE any corrections are made.
startAutoSpellCheck
public void startAutoSpellCheck(javax.swing.JEditorPane pane)
- Parameters:
pane -
stopAutoSpellCheck
public void stopAutoSpellCheck(javax.swing.JEditorPane pane)
- Parameters:
pane -
spellingError
public void spellingError(SpellCheckEvent event)