Browse Source

KERNEL-10650:修改兼容原有frm的代码的位置,从FormParallelAction中放到FormParallelSettingPane中

feature/x
fly.li 3 years ago
parent
commit
5e91a695f3
  1. 4
      designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java
  2. 16
      designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java

4
designer-form/src/main/java/com/fr/design/actions/FormParallelAction.java

@ -64,10 +64,6 @@ public class FormParallelAction extends JTemplateAction<JForm> {
FormParallelSettingPane attrPane = new FormParallelSettingPane();
Form form = jf.getTarget();
FormParallelAttr parallelAttr = form.getParallelAttr();
//兼容之前的frm文件,在获取不到属性时
if (parallelAttr == null){
parallelAttr = FormParallelAttr.getDefaultParallelAttr();
}
attrPane.populateBean(parallelAttr);
UIDialog dialog = attrPane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override

16
designer-form/src/main/java/com/fr/design/widget/ui/designer/FormParallelSettingPane.java

@ -39,22 +39,18 @@ public class FormParallelSettingPane extends BasicBeanPane<FormParallelAttr> {
private void initPane(){
JPanel calSettingPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Designer_Form_Block_Parallel_Setting"));
calSettingPane.add(getCalculateSettingPane());
this.parallelCalculatePane = new ParallelSettingPane();
calSettingPane.add(parallelCalculatePane);
calSettingPane.setPreferredSize(new Dimension(550,110));
this.add(calSettingPane);
}
private ParallelSettingPane getCalculateSettingPane(){
if (parallelCalculatePane == null){
this.parallelCalculatePane = new ParallelSettingPane();
}
return parallelCalculatePane;
}
@Override
public void populateBean(FormParallelAttr ob) {
getCalculateSettingPane().populateBean(ob.getParallelCalculateMark());
if (ob == null){
ob = FormParallelAttr.getDefaultParallelAttr();
}
parallelCalculatePane.populateBean(ob.getParallelCalculateMark());
}
@Override

Loading…
Cancel
Save