java-gnome version 4.0.19

org.freedesktop.enchant
Class Dictionary

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.freedesktop.enchant.Dictionary

public class Dictionary
extends org.freedesktop.bindings.Proxy

Since:
4.0.14
Author:
Andrew Cowie

Method Summary
 void add(String word)
          Add a word to the personal dictionary.
 boolean check(String word)
          Check the spelling of the given word.
 void remove(String word)
          Remove a word from the personal dictionary.
 String[] suggest(String word)
          Offer alternate suggestions of how to spell a word.
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

add

public void add(String word)
Add a word to the personal dictionary.

Since:
4.0.14

check

public boolean check(String word)
Check the spelling of the given word.

Returns true if the word is deemed to be spelt correctly, false if incorrect.

The underlying library documentation also notes an error state; should it be encountered we throw an IllegalStateException.

Since:
4.0.14

remove

public void remove(String word)
Remove a word from the personal dictionary.

FIXME
This does remove the word from the Enchant personal word list, but it then adds it to something called the "exclude" list. What is that all about?

Since:
4.0.14

suggest

public String[] suggest(String word)
Offer alternate suggestions of how to spell a word.

Beware that you can get suggestions even from a word that is correctly spelt! This means that you need to call check() first to find out whether or not to offer a list of corrections.

Since:
4.0.14


java-gnome