net.rim.blackberry.api.spellcheck
Class AbstractSpellCheckUIListener

java.lang.Object
  |
  +--net.rim.blackberry.api.spellcheck.AbstractSpellCheckUIListener
All Implemented Interfaces:
SpellCheckUIListener

public abstract class AbstractSpellCheckUIListener
extends Object
implements SpellCheckUIListener

An empty implementation of SpellCheckUIListener.

For convenience, applications can extend this class and override only the methods defined in SpellCheckUIListener that are desired.

Since:
JDE 4.5.0

Field Summary
 
Fields inherited from interface net.rim.blackberry.api.spellcheck.SpellCheckUIListener
ACTION_ADD_TO_DICTIONARY, ACTION_CANCEL, ACTION_CHANGED, ACTION_IGNORE_ALL, ACTION_IGNORE_ONCE, ACTION_OPEN_UI, LEARNING_ACCEPT, LEARNING_REJECT, REASON_HOLSTERED, REASON_LOCKED, REASON_UNKNOWN, REASON_USER_CANCELLED
 
Constructor Summary
protected AbstractSpellCheckUIListener()
          Creates a new AbstractSpellCheckUIListener object.
 
Method Summary
 boolean generatedSpellingCandidates(SpellCheckUI ui, Field field, int offset, int len, StringBuffer suggestions)
          The implementation of this method does nothing and returns false.
 boolean generatingSpellingCandidates(SpellCheckUI ui, Field field, int offset, int len, StringBuffer suggestions)
          The implementation of this method does nothing and returns false.
 int misspelledWordFound(SpellCheckUI ui, Field field, int offset, int len)
          The implementation of this method does nothing and returns ACTION_OPEN_UI.
 int repeatedWordsFound(SpellCheckUI ui, Field field, int offset, int len)
          The implementation of this method does nothing and returns ACTION_OPEN_UI.
 void spellCheckCompleted(SpellCheckUI ui, Field field, int status, int reason)
          The implementation of this method does nothing.
 boolean spellCheckStarted(SpellCheckUI ui, Field field)
          The implementation of this method does nothing and returns true.
 int wordCorrectionLearned(SpellCheckUI ui, StringBuffer word, StringBuffer correction)
          The implementation of this method does nothing and returns LEARNING_ACCEPT.
 int wordIgnored(SpellCheckUI ui, StringBuffer word, boolean ignoreAll)
          The implementation of this method does nothing and returns -1.
 int wordLearned(SpellCheckUI ui, StringBuffer word)
          The implementation of this method does nothing and returns LEARNING_ACCEPT.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSpellCheckUIListener

protected AbstractSpellCheckUIListener()
Creates a new AbstractSpellCheckUIListener object.

The implementation of this method does nothing.

Since:
JDE 4.5.0
Method Detail

generatedSpellingCandidates

public boolean generatedSpellingCandidates(SpellCheckUI ui,
                                           Field field,
                                           int offset,
                                           int len,
                                           StringBuffer suggestions)
The implementation of this method does nothing and returns false.
Returns:
false to indicate that the method did not modify the provided list of suggestions.
Since:
JDE 4.5.0

generatingSpellingCandidates

public boolean generatingSpellingCandidates(SpellCheckUI ui,
                                            Field field,
                                            int offset,
                                            int len,
                                            StringBuffer suggestions)
The implementation of this method does nothing and returns false.
Returns:
false to indicate that the method did not modify the provided list of suggestions.
Since:
JDE 4.5.0

misspelledWordFound

public int misspelledWordFound(SpellCheckUI ui,
                               Field field,
                               int offset,
                               int len)
The implementation of this method does nothing and returns ACTION_OPEN_UI.
Returns:
SpellCheckUIListener.ACTION_OPEN_UI to indicate that the user should be presented with the built-in user interface for handling this event.
Since:
JDE 4.5.0

repeatedWordsFound

public int repeatedWordsFound(SpellCheckUI ui,
                              Field field,
                              int offset,
                              int len)
The implementation of this method does nothing and returns ACTION_OPEN_UI.
Returns:
SpellCheckUIListener.ACTION_OPEN_UI to indicate that the user should be presented with the built-in user interface for handling this event.
Since:
JDE 4.5.0

spellCheckCompleted

public void spellCheckCompleted(SpellCheckUI ui,
                                Field field,
                                int status,
                                int reason)
The implementation of this method does nothing.
Since:
JDE 4.5.0

Following copied from interface: SpellCheckUIListener
Parameters:
ui - the SpellCheckUI that caused this method invocation.
field - the field that was spell checked.
status - the result of the spell checking of the field.
reason - the reason for abnormal completion when spell checking the field.
See Also:
SpellCheckUIListener.REASON_UNKNOWN, SpellCheckUIListener.REASON_USER_CANCELLED, SpellCheckUIListener.REASON_HOLSTERED, SpellCheckUIListener.REASON_LOCKED

spellCheckStarted

public boolean spellCheckStarted(SpellCheckUI ui,
                                 Field field)
The implementation of this method does nothing and returns true.
Returns:
unconditionally returns true to indicate that spell checking should proceed.
Since:
JDE 4.5.0

wordCorrectionLearned

public int wordCorrectionLearned(SpellCheckUI ui,
                                 StringBuffer word,
                                 StringBuffer correction)
The implementation of this method does nothing and returns LEARNING_ACCEPT.
Returns:
SpellCheckUIListener.LEARNING_ACCEPT to indicate that the specified correction should be accepted.
Since:
JDE 4.5.0

wordIgnored

public int wordIgnored(SpellCheckUI ui,
                       StringBuffer word,
                       boolean ignoreAll)
The implementation of this method does nothing and returns -1.
Returns:
-1 since the return value is ignored.
Since:
JDE 4.5.0

wordLearned

public int wordLearned(SpellCheckUI ui,
                       StringBuffer word)
The implementation of this method does nothing and returns LEARNING_ACCEPT.
Returns:
SpellCheckUIListener.LEARNING_ACCEPT to indicate that the specified word learning should be accepted.
Since:
JDE 4.5.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.