class SpellChecker extends java.lang.Object implements ChatListener
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
LOCALE_CHANGED_PROP |
Constructor and Description |
---|
SpellChecker() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list.
|
void |
chatClosed(Chat chat)
Notifies this instance that a Chat has been closed.
|
void |
chatCreated(Chat chat)
Notifies this instance that a new Chat has been created.
|
(package private) java.io.File |
getLocalDictForLocale(Parameters.Locale locale)
Gets the file object for user-installed dictionaries.
|
(package private) Parameters.Locale |
getLocale()
Provides the locale of the dictionary currently being used by the spell
checker.
|
(package private) java.util.List<java.lang.String> |
getPersonalWords()
Provides the user's list of words to be ignored by the spell checker.
|
(package private) boolean |
isEnabled() |
(package private) boolean |
isLocaleAvailable(Parameters.Locale locale)
Determines if locale's dictionary is locally available or a system.
|
(package private) boolean |
isUserLocale(Parameters.Locale locale)
Determines if locale's dictionary is locally available or a system.
|
(package private) void |
removeLocale(Parameters.Locale locale)
Removes the dictionary from the system, and sets the default locale
dictionary as the current dictionary
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
|
(package private) void |
setEnabled(boolean enabled) |
(package private) void |
setLocale(Parameters.Locale locale)
Resets spell checker to use a different locale's dictionary.
|
(package private) void |
setPersonalWords(java.util.List<java.lang.String> words)
Writes custom dictionary and updates spell checker to utilize new
listing.
|
(package private) void |
start(org.osgi.framework.BundleContext bc)
Associates spell checking capabilities with all chats.
|
(package private) void |
stop()
Removes the spell checking capabilities from all chats.
|
static final java.lang.String LOCALE_CHANGED_PROP
void start(org.osgi.framework.BundleContext bc) throws java.lang.Exception
bc
- execution context of the bundlejava.lang.Exception
void stop()
public void chatClosed(Chat chat)
chatClosed
in interface ChatListener
chat
- the Chat which has been closedpublic void chatCreated(Chat chat)
chatCreated
in interface ChatListener
chat
- the new Chat which has been createdjava.util.List<java.lang.String> getPersonalWords()
void setPersonalWords(java.util.List<java.lang.String> words)
words
- words to be ignored by the spell checkerParameters.Locale getLocale()
void setLocale(Parameters.Locale locale) throws java.lang.Exception
locale
- locale of dictionary to be usedjava.lang.Exception
- problem occurring in utilizing locale's dictionaryjava.io.File getLocalDictForLocale(Parameters.Locale locale) throws java.lang.Exception
locale
- The locale whose filename is needed.java.lang.Exception
void removeLocale(Parameters.Locale locale) throws java.lang.Exception
locale
- locale to be removedjava.lang.Exception
boolean isLocaleAvailable(Parameters.Locale locale)
locale
- locale to be checkedboolean isUserLocale(Parameters.Locale locale)
locale
- locale to be checkedboolean isEnabled()
void setEnabled(boolean enabled)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removed
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.