Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.im.spi

Interface InputMethodContext

java.lang.Object
|
+--java.awt.im.InputMethodRequests
   |
   +--java.awt.im.spi.InputMethodContext

All Implemented Interfaces:

InputMethodRequests


public interface InputMethodContext

implements InputMethodRequests

Provides methods for the communication context between an input method and the client component. This should be passed to InputMethod#setInputMethodContext(InputMethodContext).

Since:Author:

Method Summary

javax.swing.JFramecreateInputMethodJFrame(java.lang.String title, boolean attachToInputContext)

Creates a top-level Swing JFrame for use by the input method.
java.awt.WindowcreateInputMethodWindow(java.lang.String title, boolean attachToInputContext)

Creates a top-level window for use by the input method.
voiddispatchInputMethodEvent(int id, java.text.AttributedCharacterIterator text, int count, java.awt.font.TextHitInfo caret, java.awt.font.TextHitInfo visiblePosition)

Create an input method event and dispatch it to the client.
voidenableClientWindowNotification(java.awt.im.spi.InputMethod inputMethod, boolean enable)

Sets whether notification of the client window's location and state should be enabled for the input method.

Method Details

createInputMethodJFrame

public JFrame createInputMethodJFrame(java.lang.String title, boolean attachToInputContext)

Creates a top-level Swing JFrame for use by the input method. This frame should float above all document windows and dialogs, not receive focus, and have lightweight decorations (such as no title, reduced drag regions). But this behavior may be modified to meet the platform style. The title may or may not be displayed, depending on the platform.

If attachToInputContext is true, the new window will share the input context of the input method, so that events in the new window are dispatched to the input method. Also, this supresses deactivate and activate calls to the input method caused by setVisible.

Since:Parameters:

Returns:

Throws:


createInputMethodWindow

public Window createInputMethodWindow(java.lang.String title, boolean attachToInputContext)

Creates a top-level window for use by the input method. This window should float above all document windows and dialogs, not receive focus, and have lightweight decorations (such as no title, reduced drag regions). But this behavior may be modified to meet the platform style. The title may or may not be displayed, depending on the platform.

If attachToInputContext is true, the new window will share the input context of the input method, so that events in the new window are dispatched to the input method. Also, this supresses deactivate and activate calls to the input method caused by setVisible.

Parameters:

Returns:

Throws:


dispatchInputMethodEvent

public void dispatchInputMethodEvent(int id, java.text.AttributedCharacterIterator text, int count, java.awt.font.TextHitInfo caret, java.awt.font.TextHitInfo visiblePosition)

Create an input method event and dispatch it to the client.

Parameters:


enableClientWindowNotification

public void enableClientWindowNotification(java.awt.im.spi.InputMethod inputMethod, boolean enable)

Sets whether notification of the client window's location and state should be enabled for the input method. When enabled, the input method's #notifyClientWindowChange(Rectangle) method is called. Notification is automatically disabled when the input method is disposed.

Parameters: