Top Fields Constructors Methods
com.sun.javafx.webkit

public final Class InputMethodClientImpl

extends Object
implements InputMethodClient, ExtendedInputMethodRequests
Class Inheritance
All Implemented Interfaces
com.sun.javafx.scene.input.ExtendedInputMethodRequests, javafx.scene.input.InputMethodRequests, com.sun.webkit.InputMethodClient
Imports
com.sun.javafx.scene.SceneHelper, java.lang.ref.WeakReference, java.util.ArrayList, .List, java.util.concurrent.ExecutionException, .Callable, .FutureTask, com.sun.javafx.logging.PlatformLogger, com.sun.javafx.scene.input.ExtendedInputMethodRequests, com.sun.webkit.Invoker, .InputMethodClient, .WebPage, javafx.geometry.Point2D, javafx.scene.input.InputMethodEvent, .InputMethodHighlight, .InputMethodTextRun, javafx.scene.web.WebView, com.sun.webkit.event.WCInputMethodEvent, com.sun.webkit.graphics.WCPoint

Field Summary

Modifier and TypeField and Description
private static final PlatformLogger
private boolean
private final WebPage
private final WeakReference<WebView>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private <T> T
public void
cancelLatestCommittedText()

Implements javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Gets the latest committed text from the text editing node and removes it from the node's text body.

public static WCInputMethodEvent
convertToWCInputMethodEvent(InputMethodEvent ie)

Converts the given InputMethodEvent to a WCInputMethodEvent.

public String
getCommittedText(int
the index of the first character
begin
,
int
the index of the character following the last character
end
)

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedText.

Gets the entire text contained in the text editing node except the uncommitted text.

public int
getCommittedTextLength()

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedTextLength.

Gets the length of the entire text contained in the text editing node except the uncommitted text.

public boolean
public int
getInsertPositionOffset()

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getInsertPositionOffset.

Returns the offset of the insert position in the committed text contained in the text editing node.

public int
getLocationOffset(int
the absolute x coordinate on screen
x
,
int
the absolute y coordinate on screen
y
)

Implements javafx.scene.input.InputMethodRequests.getLocationOffset.

Gets the offset within the composed text for the specified absolute x and y coordinates on the screen.

public String
getSelectedText()

Implements javafx.scene.input.InputMethodRequests.getSelectedText.

Gets the currently selected text from the text editing node.

public Point2D
getTextLocation(int
the offset within the composed text, if there is composed text; null otherwise
offset
)

Implements javafx.scene.input.InputMethodRequests.getTextLocation.

Gets the location of a specified offset in the current composed text, or of the selection in committed text.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final PlatformLogger log
stateback to summary
private boolean state
webPageback to summary
private final WebPage webPage
wvRefback to summary
private final WeakReference<WebView> wvRef

Constructor Detail

InputMethodClientImplback to summary
public InputMethodClientImpl(WebView wv, WebPage webPage)

Method Detail

activateInputMethodsback to summary
public void activateInputMethods(final boolean doActivate)

Implements com.sun.webkit.InputMethodClient.activateInputMethods.

Annotations
@Override
callOnEventThreadback to summary
private <T> T callOnEventThread(Callable<T> callable)
cancelLatestCommittedTextback to summary
public void cancelLatestCommittedText()

Implements javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Doc from javafx.scene.input.InputMethodRequests.cancelLatestCommittedText.

Gets the latest committed text from the text editing node and removes it from the node's text body. This is used for the "Undo Commit" feature in some input methods, where the committed text reverts to its previous composed state. The composed text will be sent to the node using an InputMethodEvent.

Annotations
@Override
convertToWCInputMethodEventback to summary
public static WCInputMethodEvent convertToWCInputMethodEvent(InputMethodEvent ie)

Converts the given InputMethodEvent to a WCInputMethodEvent.

getCommittedTextback to summary
public String getCommittedText(int begin, int end)

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedText.

Doc from com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedText.

Gets the entire text contained in the text editing node except the uncommitted text. The uncommitted text is ignored for index calculations.

Parameters
begin:int

the index of the first character

end:int

the index of the character following the last character

Returns:String

the committed text

Annotations
@Override
getCommittedTextLengthback to summary
public int getCommittedTextLength()

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedTextLength.

Doc from com.sun.javafx.scene.input.ExtendedInputMethodRequests.getCommittedTextLength.

Gets the length of the entire text contained in the text editing node except the uncommitted text.

Returns:int

length of the text except the uncommitted text

Annotations
@Override
getInputMethodStateback to summary
public boolean getInputMethodState()
getInsertPositionOffsetback to summary
public int getInsertPositionOffset()

Implements com.sun.javafx.scene.input.ExtendedInputMethodRequests.getInsertPositionOffset.

Doc from com.sun.javafx.scene.input.ExtendedInputMethodRequests.getInsertPositionOffset.

Returns the offset of the insert position in the committed text contained in the text editing node.

Returns:int

the offset of the insert position

Annotations
@Override
getLocationOffsetback to summary
public int getLocationOffset(int x, int y)

Implements javafx.scene.input.InputMethodRequests.getLocationOffset.

Doc from javafx.scene.input.InputMethodRequests.getLocationOffset.

Gets the offset within the composed text for the specified absolute x and y coordinates on the screen. This information is used, for example to handle mouse clicks and the mouse cursor. The offset is relative to the composed text, so offset 0 indicates the beginning of the composed text.

Parameters
x:int

the absolute x coordinate on screen

y:int

the absolute y coordinate on screen

Returns:int

the offset in the composed text.

Annotations
@Override
getSelectedTextback to summary
public String getSelectedText()

Implements javafx.scene.input.InputMethodRequests.getSelectedText.

Doc from javafx.scene.input.InputMethodRequests.getSelectedText.

Gets the currently selected text from the text editing node. This may be used for a variety of purposes. One of them is the "Reconvert" feature in some input methods. In this case, the input method will typically send an input method event to replace the selected text with composed text. Depending on the input method's capabilities, this may be the original composed text for the selected text, the latest composed text entered anywhere in the text, or a version of the text that's converted back from the selected text.

Returns:String

the latest committed text, or null when the "Undo Commit" feature is not supported

Annotations
@Override
getTextLocationback to summary
public Point2D getTextLocation(int offset)

Implements javafx.scene.input.InputMethodRequests.getTextLocation.

Doc from javafx.scene.input.InputMethodRequests.getTextLocation.

Gets the location of a specified offset in the current composed text, or of the selection in committed text. This information is, for example, used to position the candidate window near the composed text, or a composition window near the location where committed text will be inserted.

Parameters
offset:int

the offset within the composed text, if there is composed text; null otherwise

Returns:Point2D

a point representing the screen location of the offset

Annotations
@Override