public class OpenOfficeSpellDictionary extends Object implements SpellDictionary
| Constructor and Description |
|---|
OpenOfficeSpellDictionary() |
OpenOfficeSpellDictionary(File file) |
OpenOfficeSpellDictionary(File file,
boolean inBackground) |
OpenOfficeSpellDictionary(File dictFile,
File affFile) |
OpenOfficeSpellDictionary(File dictFile,
File affFile,
boolean inBackground) |
OpenOfficeSpellDictionary(InputStream zipStream,
File personalDict) |
OpenOfficeSpellDictionary(InputStream zipStream,
File personalDict,
boolean inBackground) |
OpenOfficeSpellDictionary(InputStream affIS,
InputStream dicIS) |
OpenOfficeSpellDictionary(InputStream affIS,
InputStream dicIS,
boolean inBackground) |
OpenOfficeSpellDictionary(InputStream affIS,
InputStream dicIS,
File personalDict,
boolean inBackground) |
OpenOfficeSpellDictionary(Locale locale) |
OpenOfficeSpellDictionary(ZipFile zipFile) |
OpenOfficeSpellDictionary(ZipFile zipFile,
boolean inBackground) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProgressListener(ProgressListener listener)
Add a listener to monitor dictionary load.
|
void |
addWord(String word)
Add a word permanently to the dictionary.
|
Locale |
getLocale()
The locale for what this dictionary is for.
|
List<String> |
getSuggestions(String word)
Returns a list of String that are the suggestions to any word.
|
List<String> |
getSuggestions(String word,
int nMax)
Returns a list of String that are the suggestions to any word.
|
boolean |
isCorrect(String word)
Returns true if the word is correctly spelled against the dictionary.
|
boolean |
isLoad() |
void |
load() |
void |
load(File file,
boolean inBackground) |
void |
load(File dictFile,
File affFile,
boolean inBackground) |
void |
load(InputStream zipStream,
File personalDict,
boolean inBackground) |
void |
load(InputStream affIS,
InputStream dicIS,
boolean inBackground) |
void |
load(InputStream affIS,
InputStream dicIS,
File personalDict,
boolean inBackground) |
void |
load(ZipFile zipFile,
boolean inBackground) |
void |
removeProgressListener(ProgressListener listener)
Remove a listener to monitor dictionary load
|
void |
setDictionarySource(URL url) |
void |
setLocale(Locale locale) |
public OpenOfficeSpellDictionary()
public OpenOfficeSpellDictionary(Locale locale)
public OpenOfficeSpellDictionary(InputStream affIS, InputStream dicIS) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(InputStream affIS, InputStream dicIS, boolean inBackground) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(InputStream affIS, InputStream dicIS, File personalDict, boolean inBackground) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(ZipFile zipFile) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(ZipFile zipFile, boolean inBackground) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(InputStream zipStream, File personalDict) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(InputStream zipStream, File personalDict, boolean inBackground) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(File file) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(File file, boolean inBackground) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(File dictFile, File affFile) throws IOException
IOExceptionpublic OpenOfficeSpellDictionary(File dictFile, File affFile, boolean inBackground) throws IOException
IOExceptionpublic void addWord(String word) throws SpellDictionaryException
SpellDictionaryaddWord in interface SpellDictionaryword - a word to add.SpellDictionaryExceptionpublic boolean isCorrect(String word)
SpellDictionaryisCorrect in interface SpellDictionaryword - a word to check.public List<String> getSuggestions(String word)
SpellDictionarygetSuggestions in interface SpellDictionaryword - the word that we want to get a list of spelling suggestions for.public List<String> getSuggestions(String word, int nMax)
SpellDictionarygetSuggestions in interface SpellDictionaryword - the word that we want to get a list of spelling suggestions for.nMax - the maximun number of word to returnpublic boolean isLoad()
isLoad in interface SpellDictionarypublic void load(InputStream affIS, InputStream dicIS, boolean inBackground) throws IOException
IOExceptionpublic void load(InputStream affIS, InputStream dicIS, File personalDict, boolean inBackground) throws IOException
IOExceptionpublic void load(ZipFile zipFile, boolean inBackground) throws IOException
IOExceptionpublic void load(InputStream zipStream, File personalDict, boolean inBackground) throws IOException
IOExceptionpublic void load(File dictFile, File affFile, boolean inBackground) throws IOException
IOExceptionpublic void load(File file, boolean inBackground) throws IOException
IOExceptionpublic void setDictionarySource(URL url)
public void load()
throws IOException
load in interface SpellDictionaryIOExceptionpublic void addProgressListener(ProgressListener listener)
SpellDictionaryaddProgressListener in interface SpellDictionarylistener - the listener to addpublic void removeProgressListener(ProgressListener listener)
SpellDictionaryremoveProgressListener in interface SpellDictionarypublic void setLocale(Locale locale)
public Locale getLocale()
SpellDictionarygetLocale in interface SpellDictionaryCopyright © 2020. All rights reserved.