Browse Source

Merge pull request #1314 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'ffa155d0108bee325988142e5789b6352d46c90d':
  REPORT-24357 [冒烟]条件属性中缩进属性,设置完毕不点击原来的焦点,缩进距离无法保存 10.0同步
feature/big-screen
Hades 5 years ago
parent
commit
05c1465b08
  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