public final class InputMethodClientImpl extends java.lang.Object implements InputMethodClient, ExtendedInputMethodRequests
| Modifier and Type | Field and Description |
|---|---|
private static java.util.logging.Logger |
log |
private boolean |
state |
private WebPage |
webPage |
private java.lang.ref.WeakReference<WebView> |
wvRef |
| Constructor and Description |
|---|
InputMethodClientImpl(WebView wv,
WebPage webPage) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateInputMethods(boolean doActivate) |
void |
cancelLatestCommittedText()
Gets the latest committed text from the text editing node and removes
it from the node's text body.
|
static WCInputMethodEvent |
convertToWCInputMethodEvent(InputMethodEvent ie)
Converts the given InputMethodEvent to a WCInputMethodEvent.
|
java.lang.String |
getCommittedText(int begin,
int end)
Gets the entire text contained in the text editing node except the uncommitted
text.
|
int |
getCommittedTextLength()
Gets the length of the entire text contained in the text editing node except
the uncommitted text.
|
boolean |
getInputMethodState() |
int |
getInsertPositionOffset()
Returns the offset of the insert position in the committed text contained
in the text editing node.
|
int |
getLocationOffset(int x,
int y)
Gets the offset within the composed text for the specified absolute x
and y coordinates on the screen.
|
java.lang.String |
getSelectedText()
Gets the currently selected text from the text editing node.
|
Point2D |
getTextLocation(int offset)
Gets the location of a specified offset in the current composed text,
or of the selection in committed text.
|
private static final java.util.logging.Logger log
private final java.lang.ref.WeakReference<WebView> wvRef
private final WebPage webPage
private boolean state
public void activateInputMethods(boolean doActivate)
activateInputMethods in interface InputMethodClientpublic boolean getInputMethodState()
public static WCInputMethodEvent convertToWCInputMethodEvent(InputMethodEvent ie)
public Point2D getTextLocation(int offset)
InputMethodRequestsgetTextLocation in interface InputMethodRequestsoffset - the offset within the composed text, if there is
composed text; null otherwisepublic int getLocationOffset(int x,
int y)
InputMethodRequestsgetLocationOffset in interface InputMethodRequestsx - the absolute x coordinate on screeny - the absolute y coordinate on screenpublic void cancelLatestCommittedText()
InputMethodRequestscancelLatestCommittedText in interface InputMethodRequestspublic java.lang.String getSelectedText()
InputMethodRequestsgetSelectedText in interface InputMethodRequestspublic int getInsertPositionOffset()
ExtendedInputMethodRequestsgetInsertPositionOffset in interface ExtendedInputMethodRequestspublic java.lang.String getCommittedText(int begin,
int end)
ExtendedInputMethodRequestsgetCommittedText in interface ExtendedInputMethodRequestsbegin - the index of the first characterend - the index of the character following the last characterpublic int getCommittedTextLength()
ExtendedInputMethodRequestsgetCommittedTextLength in interface ExtendedInputMethodRequests