Search in sources :

Example 1 with AutoDirectionHandler

use of com.google.gwt.i18n.client.AutoDirectionHandler in project gwt-test-utils by gwt-test-utils.

the class ValueBoxBasePatcher method setText.

@PatchMethod
static void setText(ValueBoxBase<?> valueBoxBase, String text) {
    DOM.setElementProperty(valueBoxBase.getElement(), "value", text != null ? text : "");
    AutoDirectionHandler autoDirHandler = GwtReflectionUtils.getPrivateFieldValue(valueBoxBase, "autoDirHandler");
    autoDirHandler.refreshDirection();
    int cursorPos = text != null ? text.length() : 0;
    valueBoxBase.setCursorPos(cursorPos);
}
Also used : AutoDirectionHandler(com.google.gwt.i18n.client.AutoDirectionHandler) PatchMethod(com.googlecode.gwt.test.patchers.PatchMethod)

Aggregations

AutoDirectionHandler (com.google.gwt.i18n.client.AutoDirectionHandler)1 PatchMethod (com.googlecode.gwt.test.patchers.PatchMethod)1