GATE
Version 3.1-2270

guk.im
Class GateIM

java.lang.Object
  extended by guk.im.GateIM
All Implemented Interfaces:
InputMethod

public class GateIM
extends Object
implements InputMethod

The Gate input method


Constructor Summary
GateIM(Map supportedLocales)
          Constructs a new Gate input method
 
Method Summary
 void activate()
          Activates this input method
 void deactivate(boolean isTemporary)
          Deactivates this input method
 void dispatchEvent(AWTEvent event)
          Called by the system when an input event occures in a component that uses this input method.
 void dispose()
          Disposes this input method releasing all the memory.
 void endComposition()
          Ends the curent composition.
 InputMethodContext getContext()
          Returns theinput context for this input method.
 Object getControlObject()
          Gives the clients a chance to control the bevaviour of this input method by returning a handle to itself.
 GateIMDescriptor getDescriptor()
          gets the descriptor class for this input method
static String getIMBase()
          Gets the path inside the classpath where the input methods should be found
static Font getKeyboardFont()
           
 Locale getLocale()
          Gets the active locale
 void hideWindows()
          Hides all the windows displayed by the input method.
 boolean isCompositionEnabled()
          Is this input method enabled?
protected  void loadLocale(Locale locale)
          Loads a new locale if it's not already loaded.
 void notifyClientWindowChange(Rectangle bounds)
          Called by the system when the client window has changed size or position.
 void reconvert()
          Throws a UnsupportedOperationException as this input method does not support recnversion.
 void removeNotify()
          Called by the system when a client unregisters to this input method.
 void setCharacterSubsets(Character.Subset[] subsets)
          Restricts the character ranges valid for this input method output.
 void setCompositionEnabled(boolean enable)
          Enables this input method for composition
static void setIMBase(String path)
          Sets the default path to be used when looking for input methods.
 void setInputMethodContext(InputMethodContext context)
          Provides the input method with a context.
 boolean setLocale(Locale locale)
          Selects the active locale
 void setMapVisible(boolean mapvis)
          Should the virtual keyboard map be visible?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GateIM

public GateIM(Map supportedLocales)
Constructs a new Gate input method

Parameters:
supportedLocales -
Method Detail

setInputMethodContext

public void setInputMethodContext(InputMethodContext context)
Provides the input method with a context. This method is called by the system after the input method is loaded and linked to a text component.

Specified by:
setInputMethodContext in interface InputMethod
Parameters:
context -

setLocale

public boolean setLocale(Locale locale)
Selects the active locale

Specified by:
setLocale in interface InputMethod
Parameters:
locale -

getLocale

public Locale getLocale()
Gets the active locale

Specified by:
getLocale in interface InputMethod

getDescriptor

public GateIMDescriptor getDescriptor()
gets the descriptor class for this input method


setCharacterSubsets

public void setCharacterSubsets(Character.Subset[] subsets)
Restricts the character ranges valid for this input method output. This is currently ignored by the input method.

Specified by:
setCharacterSubsets in interface InputMethod
Parameters:
subsets -

setCompositionEnabled

public void setCompositionEnabled(boolean enable)
Enables this input method for composition

Specified by:
setCompositionEnabled in interface InputMethod
Parameters:
enable -

isCompositionEnabled

public boolean isCompositionEnabled()
Is this input method enabled?

Specified by:
isCompositionEnabled in interface InputMethod

reconvert

public void reconvert()
Throws a UnsupportedOperationException as this input method does not support recnversion.

Specified by:
reconvert in interface InputMethod

dispatchEvent

public void dispatchEvent(AWTEvent event)
Called by the system when an input event occures in a component that uses this input method. The input method then analyses the input event and sends an input method event to the interested components using the input context provided by the system.

Specified by:
dispatchEvent in interface InputMethod
Parameters:
event -

notifyClientWindowChange

public void notifyClientWindowChange(Rectangle bounds)
Called by the system when the client window has changed size or position. This event is ignored by the input method.

Specified by:
notifyClientWindowChange in interface InputMethod
Parameters:
bounds -

activate

public void activate()
Activates this input method

Specified by:
activate in interface InputMethod

deactivate

public void deactivate(boolean isTemporary)
Deactivates this input method

Specified by:
deactivate in interface InputMethod
Parameters:
isTemporary -

hideWindows

public void hideWindows()
Hides all the windows displayed by the input method. Currently this only includes the virtual keyboard map.

Specified by:
hideWindows in interface InputMethod

removeNotify

public void removeNotify()
Called by the system when a client unregisters to this input method. This event is currently ignored by the input method.

Specified by:
removeNotify in interface InputMethod

endComposition

public void endComposition()
Ends the curent composition.

Specified by:
endComposition in interface InputMethod

dispose

public void dispose()
Disposes this input method releasing all the memory.

Specified by:
dispose in interface InputMethod

getControlObject

public Object getControlObject()
Gives the clients a chance to control the bevaviour of this input method by returning a handle to itself.

Specified by:
getControlObject in interface InputMethod
Returns:
a reference to this input method

setMapVisible

public void setMapVisible(boolean mapvis)
Should the virtual keyboard map be visible?

Parameters:
mapvis -

loadLocale

protected void loadLocale(Locale locale)
Loads a new locale if it's not already loaded.

Parameters:
locale -

getContext

public InputMethodContext getContext()
Returns theinput context for this input method.


setIMBase

public static void setIMBase(String path)
Sets the default path to be used when looking for input methods. This should be a resource path (a path inside the class path). By default the path is "guk/im/data/"

Parameters:
path -

getIMBase

public static String getIMBase()
Gets the path inside the classpath where the input methods should be found


getKeyboardFont

public static Font getKeyboardFont()

GATE
Version 3.1-2270