java-gnome version 4.0.19

org.gnome.gtk
Class Spell

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.gnome.glib.Boxed
          extended by org.gnome.gtk.Spell

public final class Spell
extends Boxed

Helper class which manages spell checking in TextViews. Convert a TextView to one that is doing spelling by calling TextView's attachSpell().

Augmenting a TextView to provide spell checking is provided by the GtkSpell library, which in turn leverages Enchant to connect to a spell checking backend.

If GtkSpell doesn't meet your needs, then you may try using the underlying checking API directly. We have coverage of it starting at Enchant.

Since:
4.0.12
Author:
Andrew Cowie, Serkan Kaba

Method Summary
 void recheckAll()
          Re-run the spell checker over the entire text.
 void setLanguage(String lang)
          Change the language that spellings are being checked against.
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

recheckAll

public void recheckAll()
Re-run the spell checker over the entire text.

Since:
4.0.12

setLanguage

public void setLanguage(String lang)
Change the language that spellings are being checked against.

The default language selected when you call TextView's attachSpell() is based on the LANG environment variable, so normally you don't need to call this.

Otherwise, you can attach with the other attachSpell() method, specifying a language there.

Interestingly, if for some strange reason that environment variable is not set, the language selection will fall back to English. But as it is essentially impossible to log into a GNOME system without LANG being set, you shouldn't ever encounter this.

Since:
4.0.12


java-gnome