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() {
@Override
public void actionPerformed(ActionEvent e) {
errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected());
refreshErrorMsgTip();
if (setMaxValueCheckBox.isSelected()) {
maxValueSpinner.setEnabled(true);
Double value = (double) 0;
@ -172,7 +172,7 @@ public class NumberEditorValidatePane extends JPanel {
setMinListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected());
refreshErrorMsgTip();
if (setMinValueCheckBox.isSelected()) {
minValueSpinner.setEnabled(true);
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) {
allowDecimalsCheckBox.setSelected(e.isAllowDecimals());
if (e.isAllowDecimals()) {

Loading…
Cancel
Save