Browse Source

REPORT-46421 取消勾选后 清空下内容

bugfix/10.0
hades 4 years ago
parent
commit
2d174d469f
  1. 12
      designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java

12
designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java

@ -150,7 +150,7 @@ public class NumberEditorValidatePane extends JPanel {
setMaxListener = new ActionListener() { setMaxListener = new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected()); refreshErrorMsgTip();
if (setMaxValueCheckBox.isSelected()) { if (setMaxValueCheckBox.isSelected()) {
maxValueSpinner.setEnabled(true); maxValueSpinner.setEnabled(true);
Double value = (double) 0; Double value = (double) 0;
@ -172,7 +172,7 @@ public class NumberEditorValidatePane extends JPanel {
setMinListener = new ActionListener() { setMinListener = new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected()); refreshErrorMsgTip();
if (setMinValueCheckBox.isSelected()) { if (setMinValueCheckBox.isSelected()) {
minValueSpinner.setEnabled(true); minValueSpinner.setEnabled(true);
Double value = (double) 0; Double value = (double) 0;
@ -220,6 +220,14 @@ public class NumberEditorValidatePane extends JPanel {
}; };
} }
private void refreshErrorMsgTip() {
boolean visible = setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected();
errorMsgTextFieldPane.setVisible(visible);
if (!visible) {
errorMsgTextField.setText(StringUtils.EMPTY);
}
}
public void populate(NumberEditor e) { public void populate(NumberEditor e) {
allowDecimalsCheckBox.setSelected(e.isAllowDecimals()); allowDecimalsCheckBox.setSelected(e.isAllowDecimals());
if (e.isAllowDecimals()) { if (e.isAllowDecimals()) {

Loading…
Cancel
Save