Esempio n. 1
0
  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());
  }
Esempio n. 2
0
 @Override
 void typeDone(final String newValue, final int newCursorPosition) {
   setTextInternal(newValue);
   setSelectionStart(newCursorPosition);
   setSelectionEnd(newCursorPosition);
 }