From a18f27c41af4820d5e66c1517934f0d9ac302ea5 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 20 Oct 2021 16:27:59 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-61276=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E6=9C=80=E6=96=B0=E7=9A=84release=E5=8C=85=EF=BC=8C?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E4=BC=9A?= =?UTF-8?q?=E6=89=93=E5=BC=80=E4=B8=80=E4=B8=AA=E7=A9=BAcpt=EF=BC=9B?= =?UTF-8?q?=E6=96=B0=E5=BB=BAfrm=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widget/ui/designer/NewFormPane.java | 11 +---------- .../java/com/fr/design/mainframe/app/FormApp.java | 4 +++- 2 files changed, 4 insertions(+), 11 deletions(-) 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 ca3e266543..5e55b692df 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 c048edbd0a..972df0cc8c 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 compatibleForm(FILE tplFile, HashMap classType) { classType.put(Constants.ARG_2, Parameter[].class); - JForm emptyForm = new JForm(new Form(new WBorderLayout("form")), tplFile); + NewJForm emptyForm = new NewJForm(Form.getEmptyBodyForm(), tplFile); OpenWorker> worker = new OpenWorker<>( new Callable>() { @Override