Browse Source

REPORT-59952&REPORT-60057&REPORT-60139 解决pr中的问题

research/11.0
方磊 3 years ago
parent
commit
b4abd422c9
  1. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

12
designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

@ -19,6 +19,7 @@ import com.fr.form.main.Form;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.OccupiedLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
@ -271,15 +272,22 @@ public class NewFormPane extends BasicPane {
private void newForm(String path) {
BaseJForm jForm;
try {
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class);
Form form = (Form) jForm.getTarget();
Form form = initEmptyBodyForm();
initLayoutInfo(form, path);
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class);
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jForm);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
private Form initEmptyBodyForm() {
WFitLayout body = new WFitLayout();
WBorderLayout borderLayout = new WBorderLayout("form");
borderLayout.addCenter(body);
return new Form(borderLayout);
}
/**
* 通过布局文件的位置初始化Form对象的布局信息
*

Loading…
Cancel
Save