Browse Source

Pull request #3229: REPORT-46421 取消勾选后 清空下内容

Merge in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit '2d174d469fa74fd5cf5f35a0a83d5a3b4cf9a76a':
  REPORT-46421 取消勾选后 清空下内容
bugfix/10.0
Hades 4 years ago
parent
commit
459d49a883
  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