com.inet.editor
Class SpellCheckerProxy

java.lang.Object
  extended by com.inet.editor.SpellCheckerProxy

public class SpellCheckerProxy
extends java.lang.Object

Proxy to use the JOrtho spellcheck, if it is available without hard references to the package


Constructor Summary
SpellCheckerProxy()
           
 
Method Summary
static javax.swing.JMenu createCheckerMenu()
          Returns the spell checkers alternative selection menu
static javax.swing.JMenu createLanguagesMenu()
          Returns the spell checker language selection menu
static void enableAutoSpell(javax.swing.text.JTextComponent text, boolean autoCheck)
          Enables or disables the auto spell checker, if available
static void enableShortKey(javax.swing.text.JTextComponent editor, boolean enable)
          Enables or disables the short cut key of the spell checker
static java.lang.String getApplicationName()
          Returns the application name the spell checker is running on
static java.util.Locale getCurrentLocale()
          Returns the current locale of the spellchecker
static boolean isSpellCheckerAvailable()
          Checks whether the spell checker is available
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpellCheckerProxy

public SpellCheckerProxy()
Method Detail

isSpellCheckerAvailable

public static boolean isSpellCheckerAvailable()
Checks whether the spell checker is available

Returns:
true, if the SpellChecker class could be loaded

enableAutoSpell

public static void enableAutoSpell(javax.swing.text.JTextComponent text,
                                   boolean autoCheck)
Enables or disables the auto spell checker, if available

Parameters:
text - the text component to install the spell checker on
autoCheck - true to enable, false to disable

getCurrentLocale

public static java.util.Locale getCurrentLocale()
Returns the current locale of the spellchecker

Returns:
the current locale or null

getApplicationName

public static java.lang.String getApplicationName()
Returns the application name the spell checker is running on

Returns:
the application name or null

createCheckerMenu

public static javax.swing.JMenu createCheckerMenu()
Returns the spell checkers alternative selection menu

Returns:
the menu or null, if not available

createLanguagesMenu

public static javax.swing.JMenu createLanguagesMenu()
Returns the spell checker language selection menu

Returns:
the menu or null, if not available

enableShortKey

public static void enableShortKey(javax.swing.text.JTextComponent editor,
                                  boolean enable)
Enables or disables the short cut key of the spell checker

Parameters:
editor - the editor to install or deinstall the short cut on
enable - true to enable, fals to disable