InputMethodManager is an abstract class that manages the input
method environment of JVM. There is only one InputMethodManager
instance in JVM that is executed under a separate daemon thread.
InputMethodManager performs the following:
getTriggerMenuString(). If null is returned by this method, it
means that there is only input method or none in the environment. Frame and Dialog
invoke this method.notifyChangeRequest() to notify
InputMethodManager that the user wants to switch input methods.InputMethodManager displays a pop-up menu to choose an input method.InputMethodManager notifies the current InputContext of
the selected InputMethod.notifyChangeRequestByHotKey() to notify
InputMethodManager that the user wants to switch input methods.java.awt.im.spi.InputMethod , sun.awt.im.InputContext , sun.awt.im.InputMethodAdapter
| Modifier and Type | Field and Description |
|---|---|
| private static InputMethodManager | inputMethodManager
The InputMethodManager instance |
| private static final Object | LOCK
Object for global locking |
| private static final String | threadName
InputMethodManager thread name |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract InputMethodLocator | |
| pack-priv abstract Locale | |
| public static final InputMethodManager | |
| public abstract String | getTriggerMenuString()
Gets a string for the trigger menu item that should be added to the window manager menu. |
| pack-priv abstract boolean | |
| public abstract void | notifyChangeRequest(Component
Component that has accepted the change
request. This component has to be a Frame or Dialog. comp)Notifies InputMethodManager that input method change has been requested by the user. |
| public abstract void | notifyChangeRequestByHotKey(Component
Component that has accepted the change
request. This component has the input focus. comp)Notifies InputMethodManager that input method change has been requested by the user using the hot key combination. |
| pack-priv abstract void | setInputContext(InputContext inputContext)
Sets the current input context so that it will be notified of input method changes initiated from the user interface. |
| inputMethodManager | back to summary |
|---|---|
| private static InputMethodManager inputMethodManager The InputMethodManager instance | |
| LOCK | back to summary |
|---|---|
| private static final Object LOCK Object for global locking | |
| threadName | back to summary |
|---|---|
| private static final String threadName InputMethodManager thread name | |
| InputMethodManager | back to summary |
|---|---|
| public InputMethodManager() | |
| findInputMethod | back to summary |
|---|---|
| pack-priv abstract InputMethodLocator findInputMethod(Locale forLocale) Tries to find an input method locator for the given locale. Returns null if no available input method locator supports the locale. | |
| getDefaultKeyboardLocale | back to summary |
|---|---|
| pack-priv abstract Locale getDefaultKeyboardLocale() Gets the default keyboard locale of the underlying operating system. | |
| getInstance | back to summary |
|---|---|
| public static final InputMethodManager getInstance() Returns the instance of InputMethodManager. This method creates the instance that is unique in the Java VM if it has not been created yet.
| |
| getTriggerMenuString | back to summary |
|---|---|
| public abstract String getTriggerMenuString() Gets a string for the trigger menu item that should be added to the window manager menu. If no need to display the trigger menu item, null is returned. | |
| hasMultipleInputMethods | back to summary |
|---|---|
| pack-priv abstract boolean hasMultipleInputMethods() Returns whether multiple input methods are available or not | |
| notifyChangeRequest | back to summary |
|---|---|
| public abstract void notifyChangeRequest(Component comp) Notifies InputMethodManager that input method change has been requested by the user. This notification triggers a popup menu for user selection.
| |
| notifyChangeRequestByHotKey | back to summary |
|---|---|
| public abstract void notifyChangeRequestByHotKey(Component comp) Notifies InputMethodManager that input method change has been requested by the user using the hot key combination. This notification triggers a popup menu for user selection.
| |
| setInputContext | back to summary |
|---|---|
| pack-priv abstract void setInputContext(InputContext inputContext) Sets the current input context so that it will be notified of input method changes initiated from the user interface. Set to real input context when activating; to null when deactivating. | |