Node.
This event is delivered to the Node object that extends
javafx., when the text under composition
(composed text) is generated/changed/removed, the input method commits
the result text, or the input method caret position changes.
On receiving this event, the application is supposed to display the composed text with any visual feedback attributes to the user.
Note
this is a conditional feature. See
ConditionalFeature.
for more information.
| Modifier and Type | Field and Description |
|---|---|
| public static final EventType | ANY
Common supertype for all input method event types.
|
| private final int | caretPosition
The input method caret position within the composed text. |
| private final String | committed
The text that is committed by the input method as the result of the composition. |
| private transient ObservableList | composed
The text under composition. |
| public static final EventType | INPUT_METHOD_TEXT_CHANGED
The only valid EventType for the InputMethodEvent. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | InputMethodEvent(Object
the source of the event. Can be null. source, EventTarget the target of the event. Can be null. target, EventType<InputMethodEvent> The type of the event. eventType, List<InputMethodTextRun> the text under composition composed, String the text that is committed as a result of composition committed, int the current position of the caret. caretPosition)Constructs new InputMethodEvent event. |
| public | InputMethodEvent(EventType<InputMethodEvent>
The type of the event. eventType, List<InputMethodTextRun> the text under composition composed, String the text that is committed as a result of composition committed, int the current position of the caret. caretPosition)Constructs new InputMethodEvent event with empty source and target. |
| Modifier and Type | Method and Description |
|---|---|
| public InputMethodEvent | copyFor(Object newSource, EventTarget newTarget)
Overrides javafx. Creates and returns a copy of this event with the specified event source and target. |
| public final int | Returns: The input method caret position within the composed textThe input method caret position within the composed text. |
| public final String | Returns: The committed textGets the text that is committed by the input method as the result of the composition. |
| public final ObservableList | |
| public EventType | getEventType()
Overrides javafx. Gets the event type of this event. |
| private void | |
| public String | Returns: a string representation of thisInputMethodEvent object.Overrides java. Returns a string representation of this |
| private void |
| ANY | back to summary |
|---|---|
| public static final EventType<InputMethodEvent> ANY Hides javafx. Common supertype for all input method event types.
| |
| caretPosition | back to summary |
|---|---|
| private final int caretPosition The input method caret position within the composed text. If the position is -1, the caret should be invisible.
| |
| committed | back to summary |
|---|---|
| private final String committed The text that is committed by the input method as the result of the composition.
| |
| composed | back to summary |
|---|---|
| private transient ObservableList<InputMethodTextRun> composed The text under composition. This text should be displayed with the
appropriate visual feedback that represents the
| |
| INPUT_METHOD_TEXT_CHANGED | back to summary |
|---|---|
| public static final EventType<InputMethodEvent> INPUT_METHOD_TEXT_CHANGED The only valid EventType for the InputMethodEvent. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| InputMethodEvent | back to summary |
|---|---|
| public InputMethodEvent(Object source, EventTarget target, EventType<InputMethodEvent> eventType, List<InputMethodTextRun> composed, String committed, int caretPosition) Constructs new InputMethodEvent event.
| |
| InputMethodEvent | back to summary |
|---|---|
| public InputMethodEvent(EventType<InputMethodEvent> eventType, List<InputMethodTextRun> composed, String committed, int caretPosition) Constructs new InputMethodEvent event with empty source and target.
| |
| copyFor | back to summary |
|---|---|
| public InputMethodEvent copyFor(Object newSource, EventTarget newTarget) Overrides javafx. Doc from javafx. Creates and returns a copy of this event with the specified event source
and target. If the source or target is set to
| |
| getCaretPosition | back to summary |
|---|---|
| public final int getCaretPosition() The input method caret position within the composed text. If the position is -1, the caret should be invisible.
| |
| getCommitted | back to summary |
|---|---|
| public final String getCommitted() Gets the text that is committed by the input method as the result of the composition.
| |
| getComposed | back to summary |
|---|---|
| public final ObservableList Gets the text under composition. This text should be displayed with the
appropriate visual feedback that represents the
| |
| getEventType | back to summary |
|---|---|
| public EventType Overrides javafx. Doc from javafx. Gets the event type of this event. Objects of the same
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException Hides javafx.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| writeObject | back to summary |
|---|---|
private void writeObject(ObjectOutputStream oos) throws IOException
| |