java.lang.Object | |||
↳ | java.awt.im.InputContext | ||
↳ | sun.awt.im.InputContext | ||
↳ | sun.awt.im.InputMethodContext |
The InputMethodContext class provides methods that input methods can use to communicate with their client components. It is a subclass of InputContext, which provides methods for use by components.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an InputMethodContext.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calls the current client component's implementation of cancelLatestCommittedText.
| |||||||||||
Creates a top-level Swing JFrame for use by the input method.
| |||||||||||
Creates a top-level window for use by the input method.
| |||||||||||
Dispatches an event to the active input method.
| |||||||||||
Creates an input method event from the arguments given
and dispatches it to the client component.
| |||||||||||
Calls the current client component's implementation of getCommittedText.
| |||||||||||
Calls the current client component's implementation of getCommittedTextLength.
| |||||||||||
Calls the current client component's implementation of getInsertPositionOffset.
| |||||||||||
Calls the current client component's implementation of getLocationOffset.
| |||||||||||
Calls the current client component's implementation of getSelectedText.
| |||||||||||
Calls the current client component's implementation of getTextLocation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs an InputMethodContext.
Calls the current client component's implementation of cancelLatestCommittedText.
attributes | a list of attributes that the input method is interested in |
---|
Creates a top-level Swing JFrame for use by the input method. The intended behavior of this window is:
The title may or may not be displayed, depending on the actual type of window created.
If attachToInputContext is true, the new window will share the input context that corresponds to this input method context, so that events for components in the window are automatically dispatched to the input method. Also, when the window is opened using setVisible(true), the input context will prevent deactivate and activate calls to the input method that might otherwise be caused.
Input methods must call Window.dispose
on the
returned input method window when it is no longer needed.
title | the title to be displayed in the window's title bar,
if there is such a title bar.
A null value is treated as an empty string, "". |
---|---|
attachToInputContext | whether this window should share the input context that corresponds to this input method context |
Creates a top-level window for use by the input method. The intended behavior of this window is:
The title may or may not be displayed, depending on the actual type of window created.
If attachToInputContext is true, the new window will share the input context that corresponds to this input method context, so that events for components in the window are automatically dispatched to the input method. Also, when the window is opened using setVisible(true), the input context will prevent deactivate and activate calls to the input method that might otherwise be caused.
Input methods must call Window.dispose
on the
returned input method window when it is no longer needed.
title | the title to be displayed in the window's title bar,
if there is such a title bar.
A null value is treated as an empty string, "". |
---|---|
attachToInputContext | whether this window should share the input context that corresponds to this input method context |
Dispatches an event to the active input method. Called by AWT. If no input method is available, then the event will never be consumed.
event | The event |
---|
Creates an input method event from the arguments given
and dispatches it to the client component. For arguments,
see InputMethodEvent(Component, int, long, AttributedCharacterIterator, int, TextHitInfo, TextHitInfo)
.
Calls the current client component's implementation of getCommittedText.
beginIndex | the index of the first character |
---|---|
endIndex | the index of the character following the last character |
attributes | a list of attributes that the input method is interested in |
Calls the current client component's implementation of getCommittedTextLength.
Calls the current client component's implementation of getInsertPositionOffset.
Calls the current client component's implementation of getLocationOffset.
x | the absolute x coordinate on screen |
---|---|
y | the absolute y coordinate on screen |
Calls the current client component's implementation of getSelectedText.
attributes | a list of attributes that the input method is interested in |
---|
Calls the current client component's implementation of getTextLocation.
offset | the offset within the composed text, if there is composed text; null otherwise |
---|