|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.spellcheck.AbstractSpellCheckUIListener
public abstract class AbstractSpellCheckUIListener
An empty implementation of SpellCheckUIListener.
For convenience, applications can extend this class and override only the
methods defined in
SpellCheckUIListener that are desired.
| 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 |
|---|
protected AbstractSpellCheckUIListener()
AbstractSpellCheckUIListener object.
The implementation of this method does nothing.
| Method Detail |
|---|
public boolean spellCheckStarted(SpellCheckUI ui,
Field field)
true.
spellCheckStarted in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.field - the field about to be spell checked.
true to indicate that
spell checking should proceed.
public void spellCheckCompleted(SpellCheckUI ui,
Field field,
int status,
int reason)
spellCheckCompleted in interface SpellCheckUIListenerui - 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.SpellCheckUIListener.REASON_UNKNOWN,
SpellCheckUIListener.REASON_USER_CANCELLED,
SpellCheckUIListener.REASON_HOLSTERED,
SpellCheckUIListener.REASON_LOCKED
public int misspelledWordFound(SpellCheckUI ui,
Field field,
int offset,
int len)
ACTION_OPEN_UI.
misspelledWordFound in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.field - the field whose text contains the the misspelled word.offset - the offset of the misspelled word in the field.len - the length of the misspelled word.
SpellCheckUIListener.ACTION_OPEN_UI to indicate that the
user should be presented with the built-in user interface for handling
this event.
public int repeatedWordsFound(SpellCheckUI ui,
Field field,
int offset,
int len)
ACTION_OPEN_UI.
repeatedWordsFound in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.field - the field whose text contains the the repeated word.offset - the offset of the first character of the first of the two
repeated words
in the field.len - the length of the text containing the two repeated words.
SpellCheckUIListener.ACTION_OPEN_UI to indicate that the
user should be presented with the built-in user interface for handling
this event.
public boolean generatingSpellingCandidates(SpellCheckUI ui,
Field field,
int offset,
int len,
StringBuffer suggestions)
false.
generatingSpellingCandidates in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.field - the field whose text contains the the misspelled word.offset - the offset of the misspelled word in the field.len - the length of the misspelled word.suggestions - container for storing spelling suggestions provided
by this method;
the first suggestion must be appended without prepending the null
character but subsequent spelling suggestions
must be separated from the previous suggestions with the null character.
false to indicate that the method did not modify
the provided list of suggestions.
public boolean generatedSpellingCandidates(SpellCheckUI ui,
Field field,
int offset,
int len,
StringBuffer suggestions)
false.
generatedSpellingCandidates in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.field - the field whose text contains the the misspelled word.offset - the offset of the misspelled word in the field.len - the length of the misspelled word.suggestions - the list of suggestions about to be presented to the
user, separated by the null character.
false to indicate that the method did not modify
the provided list of suggestions.
public int wordIgnored(SpellCheckUI ui,
StringBuffer word,
boolean ignoreAll)
-1.
wordIgnored in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.word - the misspelled word
-1 since the return value is ignored.
public int wordLearned(SpellCheckUI ui,
StringBuffer word)
LEARNING_ACCEPT.
wordLearned in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.word - the learned word
SpellCheckUIListener.LEARNING_ACCEPT to indicate that the
specified word learning should be accepted.
public int wordCorrectionLearned(SpellCheckUI ui,
StringBuffer word,
StringBuffer correction)
LEARNING_ACCEPT.
wordCorrectionLearned in interface SpellCheckUIListenerui - the SpellCheckUI that caused this method
invocation.word - the misspelled wordcorrection - the learned correction to the misspelled word
SpellCheckUIListener.LEARNING_ACCEPT to indicate that the
specified correction should be accepted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.