net.rim.blackberry.api.spellcheck
Class SpellCheckEngineFactory

java.lang.Object
  extended by net.rim.blackberry.api.spellcheck.SpellCheckEngineFactory

public class SpellCheckEngineFactory
extends Object

Factory for creating spell checking objects

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.5.0

Method Summary
Category: Signed static SpellCheckUI createSpellCheckUI()
          Creates an object for spell checking user interfaces.
Category: Signed static SpellCheckEngine getEngine()
          Creates and returns a spell checking engine for the language associated with the system's default locale.
Category: Signed static boolean isSpellCheckSupported(Locale locale)
          Returns whether or not spell checking is supported for the language associated with a particular locale.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

getEngine

public static SpellCheckEngine getEngine()
Creates and returns a spell checking engine for the language associated with the system's default locale. On a device with multiple languages, instantiate a new spell check engine for each language change.

Returns:
a newly-created SpellCheckEngine for the language associated with the system's default locale.
Throws:
UnsupportedLocaleException - if spell checking is not supported for the language associated with the system's default locale.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.5.0

createSpellCheckUI

public static SpellCheckUI createSpellCheckUI()
Creates an object for spell checking user interfaces.

NOTE: An application should only ever invoke this method once. It should store a reference to the returned object and use it each time a SpellCheckUI object is required instead of repeatedly invoking this method. Invoking this method more than once in a given application is undefined and may cause undefined behaviour, such as instances interfering with one another.

Returns:
a newly-created SpellCheckUI object.
Throws:
IllegalStateException - if Application instance does not exist.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.5.0

isSpellCheckSupported

public static boolean isSpellCheckSupported(Locale locale)
Returns whether or not spell checking is supported for the language associated with a particular locale.

If a spell checking engine that exactly matches the language associated with the specified locale is not supported then this method attempts to find a "close match". For example, if the specified locale is "en" but the device does not have that exact locale installed but does have en_US installed then it will be considered a "close match" and this method will return true. However, if the specified locale is Japanese, which at the time of writing does not support spell checking, then this method will return false since there is no close match to Japanese that supports spell checking. As another example, suppose that "en_GB" was specified but the spell check dictionary for that language is not installed on the device, but the spell check dictionary for "en_US" is installed. Then this method will return false since the two languages, although similar, have different spell check dictionaries.

Note that the example above is just an example and does not guarantee that any particular locale does or does not support spell checking. The only way to definitively tell whether or not a device supports spell checking for a particular locale is to invoke this method.

Parameters:
locale - the locale to test for spell checking support; if null use the system's default locale.
Returns:
true if spell checking is supported for the language associated with the specified locale; false otherwise.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.5.0





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