java.awt.event
Class InputMethodEvent
- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- java.awt.event.InputMethodEvent
-
- All Implemented Interfaces:
- java.io.Serializable
public class InputMethodEvent extends AWTEventInput method events contain information about text that is being composed using an input method. Whenever the text changes, the input method sends an event. If the text component that's currently using the input method is an active client, the event is dispatched to that component. Otherwise, it is dispatched to a separate composition window.The text included with the input method event consists of two parts: committed text and composed text. Either part may be empty. The two parts together replace any uncommitted composed text sent in previous events, or the currently selected committed text. Committed text should be integrated into the text component's persistent data, it will not be sent again. Composed text may be sent repeatedly, with changes to reflect the user's editing operations. Committed text always precedes composed text.
- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Fields Modifier and Type Field and Description ACTION_EVENT_MASK The event mask for selecting action events.ADJUSTMENT_EVENT_MASK The event mask for selecting adjustment events.CARET_POSITION_CHANGED The event type indicating a changed insertion point in input method text.COMPONENT_EVENT_MASK The event mask for selecting component events.consumed Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not.CONTAINER_EVENT_MASK The event mask for selecting container events.FOCUS_EVENT_MASK The event mask for selecting focus events.HIERARCHY_BOUNDS_EVENT_MASK The event mask for selecting hierarchy bounds events.HIERARCHY_EVENT_MASK The event mask for selecting hierarchy events.id The event's id.INPUT_METHOD_EVENT_MASK The event mask for selecting input method events.INPUT_METHOD_FIRST Marks the first integer id for the range of input method event ids.INPUT_METHOD_LAST Marks the last integer id for the range of input method event ids.INPUT_METHOD_TEXT_CHANGED The event type indicating changed input method text.INVOCATION_EVENT_MASK The event mask for selecting invocation events.ITEM_EVENT_MASK The event mask for selecting item events.KEY_EVENT_MASK The event mask for selecting key events.MOUSE_EVENT_MASK The event mask for selecting mouse events.MOUSE_MOTION_EVENT_MASK The event mask for selecting mouse motion events.MOUSE_WHEEL_EVENT_MASK The event mask for selecting mouse wheel events.PAINT_EVENT_MASK The event mask for selecting paint events.RESERVED_ID_MAX The maximum value for reserved AWT event IDs.source The object on which the Event initially occurred.TEXT_EVENT_MASK The event mask for selecting text events.WINDOW_EVENT_MASK The event mask for selecting window events.WINDOW_FOCUS_EVENT_MASK The event mask for selecting window focus events.WINDOW_STATE_EVENT_MASK The event mask for selecting window state events.
-
Methods Modifier and Type Method and Description consume Consumes this event so that it will not be processed in the default manner by the source which originated it.getCaret Gets the caret.getCommittedCharacterCount Gets the number of committed characters in the text.getID Returns the event type.getSource The object on which the Event initially occurred.getText Gets the combined committed and composed text.getVisiblePosition Gets the position that's most important to be visible.getWhen Returns the time stamp of when this event occurred.isConsumed Returns whether or not this event has been consumed.paramString Returns a parameter string identifying this event.setSource Retargets an event to a new source.toString Returns a String representation of this object.
-