diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java index ca3e26654..5e55b692d 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java @@ -282,7 +282,7 @@ public class NewFormPane extends BasicPane { private void newForm(String path) { BaseJForm jForm; try { - Form form = initEmptyBodyForm(); + Form form = Form.getEmptyBodyForm(); initLayoutInfo(form, path); jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate, ?>) jForm); @@ -291,15 +291,6 @@ public class NewFormPane extends BasicPane { } } - private Form initEmptyBodyForm() { - WFitLayout body = new WFitLayout("body"); - body.setContainerWidth(WBorderLayout.DEFAULT_WIDTH); - body.setContainerHeight(WBorderLayout.DEFAULT_HEIGHT); - WBorderLayout borderLayout = new WBorderLayout("form"); - borderLayout.addCenter(body); - return new Form(borderLayout); - } - /** * 通过布局文件的位置初始化Form对象的布局信息 * diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java index c048edbd0..972df0cc8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java @@ -4,6 +4,7 @@ import com.fr.base.Parameter; import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.base.io.XMLEncryptUtils; import com.fr.design.DesignerEnvManager; +import com.fr.design.fit.NewJForm; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.AbstractAppProvider; import com.fr.design.mainframe.BaseJForm; @@ -19,6 +20,7 @@ import com.fr.exception.TplLockedException; import com.fr.file.FILE; import com.fr.form.main.Form; import com.fr.form.ui.container.WBorderLayout; +import com.fr.form.ui.container.WFitLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.util.ReadXmlType; @@ -59,7 +61,7 @@ class FormApp extends AbstractAppProvider { */ private JTemplate