echopointng.richtext
Interface RichTextSpellChecker

All Known Implementing Classes:
AbstractRichTextSpellChecker

public interface RichTextSpellChecker

RichTextSpellChecker is an interface used by a RichTextArea to spell check the words in it.


Nested Class Summary
static interface RichTextSpellChecker.SpellCheckerWord
          SpellCheckerWord is used to indicate the words contained within a block of text.
 
Method Summary
 java.lang.String[] checkWord(java.lang.String word)
          This method is called for every word in the RichTextArea.
 RichTextSpellChecker.SpellCheckerWord[] parseWords(java.lang.String textBuffer)
          This method is called to break a text buffer into a series of words.
 

Method Detail

parseWords

RichTextSpellChecker.SpellCheckerWord[] parseWords(java.lang.String textBuffer)
This method is called to break a text buffer into a series of words. Characters within the text buffer can be overlook for spelling purposes for example. This method allows different rules to be applied by the spell check on what consitutues a word to be spell checked.

This method may be called with all whitespace or punctuation. The implementor must take care to ensure its word parsing takes tis into account.

Parameters:
textBuffer - - the text buffer that may contain zero or more words.
Returns:
a non null buffer of SpellCheckWords for the passed in text buffer

checkWord

java.lang.String[] checkWord(java.lang.String word)
This method is called for every word in the RichTextArea. The implementor is expected to return the following :

Parameters:
word - - the word to check. Garunteed to be non null, and length > 0
Returns:
an array of spell checking alternatives for the word, a zero length array if the word is not known but no alternatives are available and null if the word is not incorrect.