Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.awt.im.InputContext
By default, one InputContext instance is created per Window instance, and this input context is shared by all components within the window's container hierarchy. However, this means that only one text input operation is possible at any one time within a window, and that the text needs to be committed when moving the focus from one text component to another. If this is not desired, text components can create their own input context instances.
Not all platforms and locales support input methods. Where input methods are unavailable, input contexts can still be created and used; the InputContext instance methods return without doing anything (selectLocale returns false).
Constructor Summary | |
InputContext()
|
Method Summary | |
void | dispatchEvent(AWTEvent event)
|
void | dispose()
|
void | endComposition()
|
Object | getInputMethodControlObject()
|
static InputContext | getInstance()
|
boolean | selectInputMethod(Locale locale)
|
void | setCharacterSubsets(Character.Subset[] subsets)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected InputContext()
Method Detail |
public static InputContext getInstance()
public boolean selectInputMethod(Locale locale)
A text editing component may call this method, for example, when the user changes the insertion point, so that the user can immediately continue typing in the language of the surrounding text.
locale
- The desired new locale.
public void setCharacterSubsets(Character.Subset[] subsets)
subsets
- The subsets of the Unicode character set from which characters may be input
public void dispatchEvent(AWTEvent event)
event
- The event
public void endComposition()
A text editing component may call this in a variety of situations, for example, when the user moves the insertion point within the text (but outside the composed text), or when the component's text is saved to a file or copied to the clipboard.
public void dispose()
public Object getInputMethodControlObject()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |