net.rim.blackberry.api.spellcheck
Interface SpellCheckUI

public interface SpellCheckUI

An interface describing an object for spell checking a set of fields,
presenting the user a UI
for resolving spell checking issues as they are found. A listener can be
set to manage the fine
details of the spell checking.

Concurrent spell checking by this class is NOT supported. At most one
spell
check may be in progress at any given time. Attempting to perform more than
one spell check
will result in undefined behaviour, which may include input system crashes,
spurious exceptions being thrown, spell
checks interfering with each other, spell checks being unexpectedly
cancelled, or others.

The locale used for spell checking by instances of this interface follows
the system locale.
Therefore, the locale cannot be explicitly set programmatically.

SPELL_CHECK_COMPLETE

SPELL_CHECK_SPAWNED

static final int SPELL_CHECK_SPAWNED

Code indicating that a built-in spell check dialog has been displayed to
the user. Typically, this occurs when a misspelled word was found and a
UI has been presented to the
user to resolve the problem.

spellCheck

The specified field must be on the top-level screen of the calling
application. If the field
does not belong to a screen, the screen is not displayed, or the screen
is not on the top of
the display stack then the behaviour of this method is undefined. Note
that it is acceptable
for the field to be scrolled off the screen, as long as it is on the
top-level screen.

This method returns a code that specifies the result of the requested
spell checking operation.
The possible return values and the cases in which they are returned are
in the following list.

WARNING:
Concurrent spell checks are NOT supported. It is the responsibility of
the application to ensure
that only one spell check is in progress at any given time. Performing
concurrent spell checks
will yield undefined behaviour. To determine if a spell check is
currently in progress use
SpellCheckUI.getState().

Parameters:

field - the field to spell check

Returns:

one of the SPELL_CHECK_ constants defined in this
interface, representing
the result of this operation.

spellCheck

Spell checks a collection of fields. Each element of the specified
Enumeration
must be an instance of Field or a subclass of it. Any
elements that fail this
test will cause a ClassCastException to be thrown,
terminating the spellcheck
prematurely and not notifying any listeners.

All specified fields must be on the top-level screen of the calling
application. If one
of the fields does not belong to a screen, the screen is not displayed,
or the screen is not
on the top of the display stack then the behaviour of this method is
undefined. Note that it
is acceptable for a field to be scrolled off the screen, as long as it
is on the top-level screen.

Any fields in the specified Enumeration that are not
spell-checkable
(see Spell Checking Fields for
details) will be ignored.
Also, any null values returned from the enumeration will be ignored.

The return values and conditions under which they are returned are
identical to
SpellCheckUI.spellCheck(Field) except that SPELL_CHECK_COMPLETE
is only returned
after all elements of the enumeration have been visited.

WARNING:
Concurrent spell checks are NOT supported. It is the responsibility of
the application to ensure
that only one spell check is in progress at any given time. Performing
concurrent spell checks
will yield undefined behaviour. To determine if a spell check is
currently in progress use
SpellCheckUI.getState().

Parameters:

fields - the enumeration over the fields to spellcheck.

Returns:

one of the SPELL_CHECK_ constants defined in this
interface, representing
the result of this operation.

spellCheck

The specified manager must be on the top-level screen of the calling
application. If it
does not belong to a screen, the screen is not displayed, or the screen
is not on the top of
the display stack then the behaviour of this method is undefined. Note
that it is acceptable
for the manager to be partially or completely scrolled off the screen,
as long as it is on
the top-level screen.

Any top-level fields in the specified Manager that are not
spell-checkable
(see Spell Checking Fields for
details) will be ignored.

The return values and conditions under which they are returned are
identical to
SpellCheckUI.spellCheck(Field) except that SPELL_CHECK_COMPLETE
is only returned
after all top-level fields have been visited.

WARNING:
Concurrent spell checks are NOT supported. It is the responsibility of
the application to ensure
that only one spell check is in progress at any given time. Performing
concurrent spell checks
will yield undefined behaviour. To determine if a spell check is
currently in progress use
SpellCheckUI.getState().

Parameters:

fieldManager - the manager whose top-level fields to spellcheck.

Returns:

one of the SPELL_CHECK_ constants defined in this
interface, representing
the result of this operation.

setShowDialogs

Sets whether informational dialogs about the progress of spell checking
should be shown.

The dialogs displayed when enabled may include a "completed" dialog or a
"progress" dialog.

This method may be invoked at any time; however, if it is invoked while
a spell check
is in progress (ie. SpellCheckUI.getState()
returns STATE_RUNNING) then the dialogs
may not display immediately and may not even display until the next
spell check is started.
Therefore, it is recommended to invoke this method only when a spell
check is not in progress.

Parameters:

showDialogs - if true then show informational dialogs
during spell checking;
otherwise do not display such dialogs.

Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.Java is a trademark of Oracle America Inc. in the US and other countries.Legal