public void setEnabled(boolean isEnabled) { setReadonly(!isEnabled); moneyField.setEditable(isEnabled); if (!isEnabled) { moneyField.setDocument(textDocument); moneyField.setText(""); } else { moneyField.setDocument(moneyDocument); } }
public void setReadonly(boolean isReadonly) { this.isReadonly = isReadonly; moneyField.setEditable(!isReadonly); // En/disable currency popup also if (moneyPopup != null) { moneyPopup.setShowing(!isReadonly); } performFlags(); }