Пример #1
0
  public void setEnabled(boolean isEnabled) {
    setReadonly(!isEnabled);
    moneyField.setEditable(isEnabled);

    if (!isEnabled) {
      moneyField.setDocument(textDocument);
      moneyField.setText("");
    } else {
      moneyField.setDocument(moneyDocument);
    }
  }
Пример #2
0
  public void setReadonly(boolean isReadonly) {
    this.isReadonly = isReadonly;
    moneyField.setEditable(!isReadonly);

    // En/disable currency popup also

    if (moneyPopup != null) {
      moneyPopup.setShowing(!isReadonly);
    }

    performFlags();
  }