From 1b087b977c4ab93720cd5a6d6d7a6ba5f1b7155b Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:45:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-7034=E3=80=90=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E3=80=8Bfrm=E3=80=8Bbody?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E5=B8=83=E5=B1=80=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=BB=A5=E5=90=8E=EF=BC=8Cbody=E7=9A=84?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BB=A5=E5=8F=8A=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9D=87=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/AbstractFRLayoutDefinePane.java | 36 +++++++++++++++++++ .../FRAbsoluteBodyLayoutDefinePane.java | 4 ++- .../layout/FRAbsoluteLayoutDefinePane.java | 2 +- .../layout/FRFitLayoutDefinePane.java | 4 ++- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java new file mode 100644 index 0000000000..0a718ee60c --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java @@ -0,0 +1,36 @@ +package com.fr.design.widget.ui.designer.layout; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.widget.ui.designer.AbstractDataModify; +import com.fr.form.ui.container.WSortLayout; + +/** + * @author hades + * @version 9.0 + * Created by hades on 2019/11/18 + */ +public abstract class AbstractFRLayoutDefinePane extends AbstractDataModify { + + + public AbstractFRLayoutDefinePane(XCreator xCreator) { + super(xCreator); + } + + public AbstractFRLayoutDefinePane(XCreator xCreator, FormDesigner designer) { + super(xCreator, designer); + } + + protected void copyLayoutAttr(WSortLayout srcLayout, WSortLayout destLayout) { + destLayout.clearListeners(); + destLayout.clearMobileWidgetList(); + for (int i = 0, len = srcLayout.getMobileWidgetListSize(); i < len; i++) { + destLayout.addMobileWidget(srcLayout.getMobileWidget(i)); + } + destLayout.setSorted(true); + for (int i = 0, len = srcLayout.getListenerSize(); i < len; i++) { + destLayout.addListener(srcLayout.getListener(i)); + } + } + +} diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java index 900334cb7a..3a53cf5ffb 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java @@ -131,7 +131,9 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { if (layoutType == WBodyLayoutType.ABSOLUTE) { ((XWFitLayout) creator.getBackupParent()).toData().resetStyle(); if (state == WBodyLayoutType.FIT.getTypeValue()) { - ((XWFitLayout)creator.getBackupParent()).switch2FitBodyLayout(creator); + XWFitLayout xwFitLayout = ((XWFitLayout)creator.getBackupParent()); + xwFitLayout.switch2FitBodyLayout(creator); + copyLayoutAttr(layout, xwFitLayout.toData()); } } layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue()); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java index a5dabe2f05..81c0bdc679 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java @@ -23,7 +23,7 @@ import java.awt.Component; /** * Created by ibm on 2017/8/2. */ -public class FRAbsoluteLayoutDefinePane extends AbstractDataModify { +public class FRAbsoluteLayoutDefinePane extends AbstractFRLayoutDefinePane { protected UIComboBox comboBox; public FRAbsoluteLayoutDefinePane(XCreator xCreator) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index ff8ef4411f..73022d15d2 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -34,6 +34,7 @@ import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; +import com.fr.form.ui.container.WSortLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.core.ReportUtils; @@ -48,7 +49,7 @@ import java.awt.Dimension; /** * Created by ibm on 2017/8/2. */ -public class FRFitLayoutDefinePane extends AbstractDataModify { +public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane { private static final int ADAPT_LABEL_MAX_WIDTH = 80; private XWFitLayout xWFitLayout; private WFitLayout wFitLayout; @@ -208,6 +209,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { } xwAbsoluteBodyLayout.add(component); } + copyLayoutAttr(wFitLayout, wAbsoluteBodyLayout); xWFitLayout.setBackupParent(xwAbsoluteBodyLayout); FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); formDesigner.getSelectionModel().setSelectedCreators( From c26ec30e4b332d224143d5eacfd5271a0d14a541 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:46:46 +0800 Subject: [PATCH 2/3] fix --- .../widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java | 1 - .../design/widget/ui/designer/layout/FRFitLayoutDefinePane.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java index 81c0bdc679..dff0e159a1 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java @@ -11,7 +11,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.form.ui.container.WAbsoluteLayout; import javax.swing.BorderFactory; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 73022d15d2..4481307bff 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -26,7 +26,6 @@ import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; -import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.component.PaddingBoundPane; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.Widget; @@ -34,7 +33,6 @@ import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; -import com.fr.form.ui.container.WSortLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.core.ReportUtils; From 668c96259ec0261f8dae20e176a1bc426a302560 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:50:31 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-12734=20=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=B8=AD=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88=2010.0=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/condition/WHPane.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java index 753e3e7763..e92bf212ee 100644 --- a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java +++ b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java @@ -10,7 +10,10 @@ import com.fr.stable.Constants; import com.fr.stable.unit.*; import javax.swing.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.math.BigDecimal; +import java.text.ParseException; /** * @author richie @@ -30,6 +33,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane