Esempio n. 1
0
  /** @param str If null, "" is used. */
  public void appendText(String str) {
    if (str == null) str = "";

    clearSelection();
    cursor = text.length();
    paste(str, programmaticChangeEvents);
  }
Esempio n. 2
0
  /** @param str If null, "" is used. */
  public void setText(String str) {
    if (str == null) str = "";
    if (str.equals(text)) return;

    clearSelection();
    String oldText = text;
    text = "";
    paste(str, false);
    if (programmaticChangeEvents) changeText(oldText, text);
    cursor = 0;
  }