Browse Source

REPORT-24357 [冒烟]条件属性中缩进属性,设置完毕不点击原来的焦点,缩进距离无法保存 10.0同步

feature/big-screen
hades 5 years ago
parent
commit
ffa155d010
  1. 13
      designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java
  2. 11
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java

13
designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java

@ -7,6 +7,9 @@ import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.text.ParseException;
/**
* Created by IntelliJ IDEA.
@ -56,7 +59,17 @@ public class UIBasicSpinner extends JSpinner implements UIObserver {
}
});
}
final JFormattedTextField textField = ((JSpinner.DefaultEditor) this.getEditor()).getTextField();
textField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
try {
textField.commitEdit();
} catch (ParseException ignore) {
}
}
});
}

11
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -33,17 +33,6 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
GUICoreUtils.setColumnForSpinner(spinner, 5);
this.spinner.setValue(new Integer(0));
this.locString = locString;
final JFormattedTextField textField = ((JSpinner.NumberEditor) this.spinner.getEditor()).getTextField();
textField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
try {
textField.commitEdit();
} catch (ParseException ignore) {
}
}
});
}
@Override

Loading…
Cancel
Save