InputMethodEvent (String text, boolean commit) { return new InputMethodEvent(browser.getCefBrowser().getUIComponent(), InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, new AttributedString(text).getIterator(), commit ? text.length() : 0, null, null); }