private void setTextInternal(final String newValue) { initDefaultValue(); final DomText child = (DomText) getFirstChild(); if (child == null) { final DomText newChild = new DomText(getPage(), newValue); appendChild(newChild); } else { child.setData(newValue); } setSelectionStart(newValue.length()); setSelectionEnd(newValue.length()); }
@Override void typeDone(final String newValue, final int newCursorPosition) { setTextInternal(newValue); setSelectionStart(newCursorPosition); setSelectionEnd(newCursorPosition); }