From 303894c472f869d9083162ef95233bcd03a0a993 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 14 Dec 2022 10:37:57 +0800 Subject: [PATCH 01/16] =?UTF-8?q?REPORT-86364=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/help/AboutPane.java | 4 +-- .../platform/ServicePlatformAction.java | 29 +++++++++++++++++++ .../mainframe/toolbar/ToolBarMenuDock.java | 7 +++-- .../images/platform/platform_normal.svg | 3 ++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java create mode 100644 designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index 6158540888..d24665f69b 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -126,8 +126,8 @@ public class AboutPane extends JPanel { if (GeneralContext.getLocale().equals(Locale.TAIWAN)) { return; } - boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ: " + CloudCenter.getInstance().acquireUrlByKind("help.qq")); - contentPane.add(boxCenterAlignmentPane); + JPanel servicePlatformPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Service_Platform")+ ":", CloudCenter.getInstance().acquireUrlByKind("service.platform")); + contentPane.add(servicePlatformPane); } // 是否显示鸣谢面板 diff --git a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java new file mode 100644 index 0000000000..b9fb5fd0e1 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java @@ -0,0 +1,29 @@ +package com.fr.design.mainframe.platform; + +import com.fr.design.actions.UpdateAction; +import com.fr.design.i18n.Toolkit; +import com.fr.general.CloudCenter; + +import java.awt.Desktop; +import java.awt.event.ActionEvent; +import java.net.URI; + +/** + * @author Destiny.Lin + * @version 11.0 + * created by Destiny.Lin on 2022-12-14 + */ +public class ServicePlatformAction extends UpdateAction { + public ServicePlatformAction() { + this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform")); + this.setSmallIcon("/com/fr/design/images/platform/platform"); + } + + @Override + public void actionPerformed(ActionEvent e) { + try { + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("service.platform"))); + } catch (Exception exp) { + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 904c281560..ba734af660 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -56,6 +56,7 @@ import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.locale.impl.SupportLocaleImpl; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.ToolBarNewTemplatePane; +import com.fr.design.mainframe.platform.ServicePlatformAction; import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ShortCut; @@ -571,9 +572,11 @@ public abstract class ToolBarMenuDock { if (AlphaFineConfigManager.isALPHALicAvailable()) { shortCuts.add(new AlphaFineAction()); } - + shortCuts.add(new EnvDetectorAction()); - + //服务平台 + shortCuts.add(new ServicePlatformAction()); + shortCuts.add(SeparatorDef.DEFAULT); if (DesignerEnvManager.getEnvManager().isOpenDebug()) { OSSupportCenter.buildAction(objects -> shortCuts.add(new FineUIAction()), SupportOSImpl.FINEUI); diff --git a/designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg b/designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg new file mode 100644 index 0000000000..ab95e95f3c --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/platform/platform_normal.svg @@ -0,0 +1,3 @@ + + + From 19e6c4206cb07fa440d162c0bb4bece0d8d2e782 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 14 Dec 2022 10:44:34 +0800 Subject: [PATCH 02/16] =?UTF-8?q?REPORT-86364=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/actions/help/AboutPane.java | 2 +- .../fr/design/mainframe/platform/ServicePlatformAction.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java index d24665f69b..dbb7798f3b 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java @@ -126,7 +126,7 @@ public class AboutPane extends JPanel { if (GeneralContext.getLocale().equals(Locale.TAIWAN)) { return; } - JPanel servicePlatformPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Service_Platform")+ ":", CloudCenter.getInstance().acquireUrlByKind("service.platform")); + JPanel servicePlatformPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Service_Platform"), CloudCenter.getInstance().acquireUrlByKind("service.platform")); contentPane.add(servicePlatformPane); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java index b9fb5fd0e1..214b355680 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java @@ -9,13 +9,15 @@ import java.awt.event.ActionEvent; import java.net.URI; /** + * 帮助-服务平台 + * * @author Destiny.Lin * @version 11.0 * created by Destiny.Lin on 2022-12-14 */ public class ServicePlatformAction extends UpdateAction { public ServicePlatformAction() { - this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform")); + this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform_Title")); this.setSmallIcon("/com/fr/design/images/platform/platform"); } From d34c6db4de185ca029a2e6d135ec9e22f3927ada Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 14 Dec 2022 10:51:30 +0800 Subject: [PATCH 03/16] =?UTF-8?q?REPORT-86364=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/platform/ServicePlatformAction.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java index 214b355680..7912354501 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java @@ -2,7 +2,9 @@ package com.fr.design.mainframe.platform; import com.fr.design.actions.UpdateAction; import com.fr.design.i18n.Toolkit; +import com.fr.design.utils.BrowseUtils; import com.fr.general.CloudCenter; +import com.fr.log.FineLoggerFactory; import java.awt.Desktop; import java.awt.event.ActionEvent; @@ -23,9 +25,6 @@ public class ServicePlatformAction extends UpdateAction { @Override public void actionPerformed(ActionEvent e) { - try { - Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("service.platform"))); - } catch (Exception exp) { - } + BrowseUtils.browser(CloudCenter.getInstance().acquireUrlByKind("service.platform")); } } From 9f3c569080e01340d12b7c7c9d2f9e1ca6979689 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 15 Dec 2022 17:08:57 +0800 Subject: [PATCH 04/16] =?UTF-8?q?REPORT-86809=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93-=E6=96=B0?= =?UTF-8?q?=E5=89=8D=E7=AB=AF-=E4=BA=A4=E4=BA=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../freeze/FormECRepeatAndFreezeSettingPane.java | 2 +- .../freeze/RepeatAndFreezeSettingPane.java | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java index 2e9a17c4dc..250e7b6042 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java @@ -28,7 +28,7 @@ public class FormECRepeatAndFreezeSettingPane extends RepeatAndFreezeSettingPane } - protected void addWriteFrozen(JPanel freezePanel) { + protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { } diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index be7606a22d..ede5d7671d 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -269,13 +269,13 @@ public class RepeatAndFreezeSettingPane extends BasicPane { outfreezePanel.add(initPageFrozenPane(), BorderLayout.NORTH); outfreezePanel.add(initPageFrozenFootPane(),BorderLayout.CENTER); - tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel); + outfreezePanel.add(new UILabel(" "+ Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip") + ""),BorderLayout.SOUTH); JPanel writePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen")); - addWriteFrozen(writePanel); + addWriteFrozen(writePanel, pagePanel); - //去除对应的焦点虚线边框 - tabbedPane.setFocusable(false); - this.add(tabbedPane); + if (tabbedPane.getTabSize() == 0) { + this.add(pagePanel); + } initPageRwoListener(); initPageColListener(); initWriteListener(); @@ -319,9 +319,13 @@ public class RepeatAndFreezeSettingPane extends BasicPane { useRepeatFinisCCheckBox.addChangeListener(useRepeatFinisCListener); } - protected void addWriteFrozen(JPanel freezePanel) { + protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER); + tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel); tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel); + //去除对应的焦点虚线边框 + tabbedPane.setFocusable(false); + this.add(tabbedPane); } protected void addFootColStart(JPanel repeatPanel) { From ee4d41fbe8ea50fe6e2e6ffaf97f7467eb4a7a80 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 16 Dec 2022 14:09:33 +0800 Subject: [PATCH 05/16] =?UTF-8?q?REPORT-85618=20=E3=80=90FR=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8-=E7=A7=BB=E5=8A=A8=E7=AB=AF=E3=80=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=A1=BA=E5=BA=8F-frm=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E7=BB=84=E4=BB=B6=E4=BF=AE=E6=94=B9=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=90=8E=EF=BC=8Cbody-=E7=A7=BB=E5=8A=A8=E7=AB=AF-=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=BA=E5=BA=8F=E4=BC=9A=E6=8E=92=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/widget/ui/FormSingleWidgetCardPane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java index 81e3a53641..dc5a4cb81a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java @@ -31,6 +31,7 @@ import com.fr.design.widget.ui.designer.component.WidgetCardTagBoundPane; import com.fr.form.ui.ChartEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WScaleLayout; +import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.widget.CRBoundsWidget; import com.fr.general.ComparatorUtils; @@ -241,7 +242,12 @@ public class FormSingleWidgetCardPane extends FormWidgetCardPane { showNameInvalidDialog(Toolkit.i18nText("Fine-Design_Form_Chart_Widget_Rename_Failure")); return; } + String oldName = widget.getWidgetName(); widgetPropertyPane.update(widget); + Widget innerWidget = WSortLayout.getInnerWidget(widget); + if (!StringUtils.equals(oldName, innerWidget.getWidgetName())) { + innerWidget.setMobileOldWidgetName(oldName); + } // 上面一行更新了组件 这里必须重新调用getWidgetName xCreator.resetCreatorName(widget.getWidgetName()); xCreator.resetVisible(widget.isVisible()); From d75a4f345a3be06bbe583119914e8d5021b4d0a2 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 16 Dec 2022 14:40:39 +0800 Subject: [PATCH 06/16] =?UTF-8?q?REPORT-85618=20=E3=80=90FR=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8-=E7=A7=BB=E5=8A=A8=E7=AB=AF=E3=80=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=A1=BA=E5=BA=8F-frm=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E7=BB=84=E4=BB=B6=E4=BF=AE=E6=94=B9=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=90=8E=EF=BC=8Cbody-=E7=A7=BB=E5=8A=A8=E7=AB=AF-=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=BA=E5=BA=8F=E4=BC=9A=E6=8E=92=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/widget/ui/FormSingleWidgetCardPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java index dc5a4cb81a..98c539f278 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java @@ -28,6 +28,7 @@ import com.fr.design.widget.Operator; import com.fr.design.widget.ui.designer.component.WidgetAbsoluteBoundPane; import com.fr.design.widget.ui.designer.component.WidgetBoundPane; import com.fr.design.widget.ui.designer.component.WidgetCardTagBoundPane; +import com.fr.form.main.WidgetUtil; import com.fr.form.ui.ChartEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WScaleLayout; @@ -244,7 +245,7 @@ public class FormSingleWidgetCardPane extends FormWidgetCardPane { } String oldName = widget.getWidgetName(); widgetPropertyPane.update(widget); - Widget innerWidget = WSortLayout.getInnerWidget(widget); + Widget innerWidget = WidgetUtil.getInnerWidget(widget); if (!StringUtils.equals(oldName, innerWidget.getWidgetName())) { innerWidget.setMobileOldWidgetName(oldName); } From 6f7c26a886e0e99c24587f63ba10c48ca2a9529a Mon Sep 17 00:00:00 2001 From: WeiYanglu <> Date: Fri, 16 Dec 2022 14:55:18 +0800 Subject: [PATCH 07/16] =?UTF-8?q?REPORT-87060=20Swing=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E5=9C=A8Swing=E7=BA=BF=E7=A8=8B=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E7=BA=BF=E7=A8=8B=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/DesignTableDataManager.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 2ce2a7d828..91c2080479 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -41,6 +41,7 @@ import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import javax.swing.JFrame; +import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.io.ByteArrayOutputStream; @@ -649,13 +650,15 @@ public abstract class DesignTableDataManager { } private static void showParaWindow(final Map parameterMap, ParameterProvider[] inParameters) { - final ParameterInputPane pPane = new ParameterInputPane(inParameters); - pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { - @Override - public void doOk() { - parameterMap.putAll(pPane.update()); - } - }).setVisible(true); + SwingUtilities.invokeLater(() -> { + final ParameterInputPane pPane = new ParameterInputPane(inParameters); + pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { + @Override + public void doOk() { + parameterMap.putAll(pPane.update()); + } + }).setVisible(true); + }); } public static void setThreadLocal(String value) { From a89021bdeb17860386a62fc25d16a48ea4b5eec6 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 16 Dec 2022 16:01:14 +0800 Subject: [PATCH 08/16] =?UTF-8?q?REPORT-87124=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=9C=80=E8=A6=81=E5=AF=B9?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=B9=B3=E5=8F=B0=E5=81=9A=E4=B8=8B=E9=9A=90?= =?UTF-8?q?=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index ba734af660..3c75eff39d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -574,8 +574,11 @@ public abstract class ToolBarMenuDock { } shortCuts.add(new EnvDetectorAction()); - //服务平台 - shortCuts.add(new ServicePlatformAction()); + //服务平台(仅针对中国大陆) + if (GeneralContext.getLocale().equals(Locale.CHINA)) { + shortCuts.add(new ServicePlatformAction()); + } + shortCuts.add(SeparatorDef.DEFAULT); if (DesignerEnvManager.getEnvManager().isOpenDebug()) { From 42f9d5ee53dea2040500dff98449e32141cb0dbf Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 16 Dec 2022 16:40:44 +0800 Subject: [PATCH 09/16] =?UTF-8?q?REPORT-86482=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=8E=B7=E5=8F=96=E6=97=B6=E9=97=B4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/update/ui/dialog/UpdateMainDialog.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index 0dd70e03cd..1fa37f60f8 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -488,7 +488,7 @@ public class UpdateMainDialog extends UIDialog { continue; } } - if (isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null) { + if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) { updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)}); } } @@ -499,6 +499,11 @@ public class UpdateMainDialog extends UIDialog { } } + + private boolean isValid(String[] updateInfo, String curJarDate) { + return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0; + } + private void updateCachedInfoFile(JSONArray jsonArray) throws Exception { String cacheDirPath = StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres"); File cacheFileDir = new File(cacheDirPath); @@ -554,13 +559,18 @@ public class UpdateMainDialog extends UIDialog { continue; } } - if (isValidLogInfo(updateTitle)) { + Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); + if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) { updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)}); } } return new ArrayList<>(updateInfoList); } + private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) { + return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0; + } + private boolean containsKeyword(String str, String keyword) { return str.toUpperCase().contains(keyword.toUpperCase()); } From 911468c341895888d9df7e649352975587b24737 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 19 Dec 2022 17:47:32 +0800 Subject: [PATCH 10/16] =?UTF-8?q?REPORT-87102=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93-=E6=96=B0?= =?UTF-8?q?=E5=89=8D=E7=AB=AF-=E4=BA=A4=E4=BA=92-=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=9C=A8=E6=9C=AA=E5=8B=BE=E9=80=89=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=BB=93=E5=B0=BE=E8=A1=8C=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E5=86=BB=E7=BB=93=E7=BB=93=E5=B0=BE=E8=A1=8C=E6=98=AF?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index ede5d7671d..5e6376bddf 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -534,6 +534,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { this.repeatFinisColPane.populateBean(defaultFT); this.repeatFinisColPane.setEnabled(false); useRepeatFinisCCheckBox.setSelected(false); + usePageFootFrozenCCheckBox.setEnabled(false); } else { this.repeatFinisColPane.populateBean(ft); useRepeatFinisCCheckBox.setSelected(true); From f016fc362880566514c86589bdd4b689936f0cab Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 20 Dec 2022 17:00:20 +0800 Subject: [PATCH 11/16] =?UTF-8?q?REPORT-87102=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93-=E6=96=B0?= =?UTF-8?q?=E5=89=8D=E7=AB=AF-=E4=BA=A4=E4=BA=92-=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=9C=A8=E6=9C=AA=E5=8B=BE=E9=80=89=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=BB=93=E5=B0=BE=E8=A1=8C=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E5=86=BB=E7=BB=93=E7=BB=93=E5=B0=BE=E8=A1=8C=E6=98=AF?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/freeze/RepeatAndFreezeSettingPane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 5e6376bddf..4ba6a10ebc 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -496,7 +496,6 @@ public class RepeatAndFreezeSettingPane extends BasicPane { this.repeatTitleRowPane.populateBean(defaultFT); this.repeatTitleRowPane.setEnabled(false); usePageHeadFrozenRCheckBox.setEnabled(false); - usePageFootFrozenRCheckBox.setEnabled(false); } else { this.repeatTitleRowPane.populateBean(ft); useRepeatTitleRCheckBox.setSelected(true); @@ -507,6 +506,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { this.repeatFinisRowPane.populateBean(defaultFT); this.repeatFinisRowPane.setEnabled(false); useRepeatFinisRCheckBox.setSelected(false); + usePageFootFrozenRCheckBox.setEnabled(false); } else { this.repeatFinisRowPane.populateBean(ft); useRepeatFinisRCheckBox.setSelected(true); @@ -523,7 +523,6 @@ public class RepeatAndFreezeSettingPane extends BasicPane { this.repeatTitleColPane.populateBean(defaultFT); this.repeatTitleColPane.setEnabled(false); usePageHeadFrozenCCheckBox.setEnabled(false); - usePageFootFrozenCCheckBox.setEnabled(false); } else { this.repeatTitleColPane.populateBean(ft); useRepeatTitleCCheckBox.setSelected(true); From f992e29eee870ae7dacbd3b46422e6387efea9fd Mon Sep 17 00:00:00 2001 From: WeiYanglu <> Date: Wed, 21 Dec 2022 11:31:02 +0800 Subject: [PATCH 12/16] =?UTF-8?q?REPORT-87323=20=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=9C=AA=E8=BE=93?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=B0=B1=E5=87=BA=E7=8E=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E9=A2=84=E8=A7=88=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/DesignTableDataManager.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 91c2080479..2ce2a7d828 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -41,7 +41,6 @@ import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import javax.swing.JFrame; -import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.io.ByteArrayOutputStream; @@ -650,15 +649,13 @@ public abstract class DesignTableDataManager { } private static void showParaWindow(final Map parameterMap, ParameterProvider[] inParameters) { - SwingUtilities.invokeLater(() -> { - final ParameterInputPane pPane = new ParameterInputPane(inParameters); - pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { - @Override - public void doOk() { - parameterMap.putAll(pPane.update()); - } - }).setVisible(true); - }); + final ParameterInputPane pPane = new ParameterInputPane(inParameters); + pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { + @Override + public void doOk() { + parameterMap.putAll(pPane.update()); + } + }).setVisible(true); } public static void setThreadLocal(String value) { From 187e9170416f32ac094f0f58a74675e0501fe3e8 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 23 Dec 2022 17:29:12 +0800 Subject: [PATCH 13/16] =?UTF-8?q?REPORT-82895=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20=E6=8A=BD=E5=8F=96=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../freeze/RepeatAndFreezeSettingPane.java | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 4ba6a10ebc..b9806ddb39 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -583,9 +583,53 @@ public class RepeatAndFreezeSettingPane extends BasicPane { updateRowPane(attribute); updateColPane(attribute); + //单独将重复、分页、填报处理一下,原先的判断逻辑比较混乱,抽出来方便判断 + updateUseAttr(attribute); + return attribute; } + private void updateUseAttr(ReportPageAttrProvider attribute) { + attribute.setUseRepeat(isUseRepeat()); + attribute.setUsePageFrozen(isUsePageFrozen()); + attribute.setUseWriteFrozen(isUseWriteFrozen()); + } + + /** + * 是否使用填报冻结 + * + * @return 使用则返回true + */ + private boolean isUseWriteFrozen() { + return this.useWriteFrozenCCheckBox.isSelected() + || this.useWriteFrozenRCheckBox.isSelected(); + } + + + /** + * 是否使用分页冻结 + * + * @return 使用则返回true + */ + private boolean isUsePageFrozen() { + return this.usePageHeadFrozenRCheckBox.isSelected() + || this.usePageHeadFrozenCCheckBox.isSelected() + || this.usePageFootFrozenRCheckBox.isSelected() + || this.usePageFootFrozenCCheckBox.isSelected(); + } + + /** + * 是否使用重复 + * + * @return 使用返回true + */ + private boolean isUseRepeat() { + return this.useRepeatTitleRCheckBox.isSelected() + || this.useRepeatFinisRCheckBox.isSelected() + || this.useRepeatTitleCCheckBox.isSelected() + || this.useRepeatFinisCCheckBox.isSelected(); + } + /** * 给内部的重复与冻结选项添加指定的边框 * @@ -609,7 +653,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { attribute.setRepeatFooterRowFrom(finishFrom); attribute.setRepeatFooterRowTo(finishTo); - attribute.setUsePageFrozenRow(this.usePageHeadFrozenRCheckBox.isSelected() || this.usePageFootFrozenRCheckBox.isSelected()); + attribute.setUsePageFrozenRow(this.usePageHeadFrozenRCheckBox.isSelected()); attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected()); attribute.setUsePageFootRowFrozen(this.usePageFootFrozenRCheckBox.isSelected()); @@ -630,7 +674,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { attribute.setRepeatFooterColumnFrom(finishFrom); attribute.setRepeatFooterColumnTo(finishTo); - attribute.setUsePageFrozenColumn(this.usePageHeadFrozenCCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected()); + attribute.setUsePageFrozenColumn(this.usePageHeadFrozenCCheckBox.isSelected()); attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected()); attribute.setUsePageFootColFrozen(this.usePageFootFrozenCCheckBox.isSelected()); From 11cc506f1aaa860c8eada9a3cb52a424ccf1357c Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 26 Dec 2022 18:27:40 +0800 Subject: [PATCH 14/16] =?UTF-8?q?REPORT-87566=20=E3=80=90=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93=E3=80=91?= =?UTF-8?q?FRM-22.12.26=E7=9A=84release=E5=88=86=E6=94=AF=EF=BC=8CFRM?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=86=BB=E7=BB=93=E7=9A=84=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E6=97=B6=E6=97=A0=E5=93=8D=E5=BA=94=E4=B8=94?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=9C=89=E7=A9=BA=E6=8C=87=E9=92=88=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/report/freeze/FormECRepeatAndFreezeSettingPane.java | 2 +- .../com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java index 250e7b6042..6e53599492 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/FormECRepeatAndFreezeSettingPane.java @@ -29,7 +29,7 @@ public class FormECRepeatAndFreezeSettingPane extends RepeatAndFreezeSettingPane } protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { - + super.initWriteFrozenPane(); } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index b9806ddb39..0d5ca8de7f 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -206,7 +206,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { /** * 填报冻结Pane */ - private JPanel initWriteFrozenPane() { + protected JPanel initWriteFrozenPane() { JPanel writePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); // 填报冻结 UILabel writeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Face_Write_Frozen") + ":"); From 91383d8d020026dee17b8ce0c6a42fd48344a2d7 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 30 Dec 2022 13:38:05 +0800 Subject: [PATCH 15/16] =?UTF-8?q?KERNEL-13094=20=E6=94=AF=E6=8C=81frm?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6copy=E5=88=B0fvs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/models/ClipboardProvider.java | 18 ++++++++ .../models/DashboardClipboardManager.java | 45 +++++++++++++++++++ .../beans/models/FormSelectionClipboard.java | 45 +++++++++++++++++++ .../designer/beans/models/SelectionModel.java | 26 ++++++----- 4 files changed, 122 insertions(+), 12 deletions(-) create mode 100644 designer-form/src/main/java/com/fr/design/designer/beans/models/ClipboardProvider.java create mode 100644 designer-form/src/main/java/com/fr/design/designer/beans/models/DashboardClipboardManager.java create mode 100644 designer-form/src/main/java/com/fr/design/designer/beans/models/FormSelectionClipboard.java diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/ClipboardProvider.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/ClipboardProvider.java new file mode 100644 index 0000000000..4382fc35f7 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/ClipboardProvider.java @@ -0,0 +1,18 @@ +package com.fr.design.designer.beans.models; + +public interface ClipboardProvider { + + /** + * 剪切到剪贴板 + * + * @param o 剪切对象 + */ + void cut2Clipboard(Object o); + + /** + * 复制到剪贴板 + * + * @param o 复制对象 + */ + void copy2Clipboard(Object o); +} diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/DashboardClipboardManager.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/DashboardClipboardManager.java new file mode 100644 index 0000000000..55cf2f12c7 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/DashboardClipboardManager.java @@ -0,0 +1,45 @@ +package com.fr.design.designer.beans.models; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用来管理不同剪贴板,以及之间的数据同步 + */ +public class DashboardClipboardManager { + private static class Holder { + private static final DashboardClipboardManager HOLDER = new DashboardClipboardManager(); + } + + private static final List CLIPBOARD_LIST = new ArrayList<>(); + + + public void registerDashboardClipboard(ClipboardProvider clipboard) { + CLIPBOARD_LIST.add(clipboard); + } + + public void removeDashboardClipboard(ClipboardProvider clipboard) { + CLIPBOARD_LIST.remove(clipboard); + } + + public static DashboardClipboardManager getInstance() { + return Holder.HOLDER; + } + + private DashboardClipboardManager() { + } + + public void cut2Clipboard(Object o) { + for (ClipboardProvider clipboard : CLIPBOARD_LIST) { + //同步其他剪贴板 + clipboard.cut2Clipboard(o); + } + } + + public void copy2Clipboard(Object o) { + for (ClipboardProvider clipboard : CLIPBOARD_LIST) { + //同步其他剪贴板 + clipboard.copy2Clipboard(o); + } + } +} diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/FormSelectionClipboard.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/FormSelectionClipboard.java new file mode 100644 index 0000000000..a190532769 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/FormSelectionClipboard.java @@ -0,0 +1,45 @@ +package com.fr.design.designer.beans.models; + +import com.fr.design.mainframe.FormSelection; + +public class FormSelectionClipboard implements ClipboardProvider { + private static final FormSelection FRM_CLIPBOARD = new FormSelection(); + + static { + DashboardClipboardManager.getInstance().registerDashboardClipboard(FormSelectionClipboard.getInstance()); + } + + private static class Holder { + private static final FormSelectionClipboard HOLDER = new FormSelectionClipboard(); + } + + public static FormSelectionClipboard getInstance() { + return Holder.HOLDER; + } + + private FormSelectionClipboard() { + } + + + public boolean isEmpty() { + return FRM_CLIPBOARD.isEmpty(); + } + + public FormSelection getClipboard() { + return FRM_CLIPBOARD; + } + + @Override + public void cut2Clipboard(Object o) { + if (o instanceof FormSelection) { + ((FormSelection) o).cut2ClipBoard(FRM_CLIPBOARD); + } + } + + @Override + public void copy2Clipboard(Object o) { + if (o instanceof FormSelection) { + ((FormSelection) o).copy2ClipBoard(FRM_CLIPBOARD); + } + } +} diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java index f75e08d723..807325a3b4 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java @@ -46,12 +46,14 @@ public class SelectionModel { //被粘贴组件在所选组件位置处往下、往右各错开20像素。执行多次粘贴时,在上一次粘贴的位置处错开20像素。 private static final int DELTA_X_Y = 20; //粘贴时候的偏移距离 private static final double OFFSET_RELATIVE = 0.80; - private static FormSelection clipboard = new FormSelection(); + private static FormSelectionClipboard formClipboard = FormSelectionClipboard.getInstance(); private FormDesigner designer; private FormSelection selection; private Rectangle hotspotBounds; private FormWidgetOptionProvider provider; + + public SelectionModel(FormDesigner designer) { this.designer = designer; selection = new FormSelection(); @@ -71,7 +73,7 @@ public class SelectionModel { * @return 是否为空 */ public static boolean isEmpty() { - return clipboard.isEmpty(); + return formClipboard.isEmpty(); } /** @@ -161,7 +163,7 @@ public class SelectionModel { if (hasSelectionComponent()) { FormSelection cutSelection = ClipboardFilter.cut(selection); if (cutSelection != null) { - cutSelection.cut2ClipBoard(clipboard); + DashboardClipboardManager.getInstance().cut2Clipboard(cutSelection); designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_CUTED); setSelectedCreator(hasSelectedParaComponent() ? designer.getParaComponent() : designer.getRootComponent()); designer.repaint(); @@ -192,7 +194,7 @@ public class SelectionModel { if (!selection.isEmpty()) { FormSelection copySelection = ClipboardFilter.copy(selection); if (copySelection != null) { - copySelection.copy2ClipBoard(clipboard); + DashboardClipboardManager.getInstance().copy2Clipboard(copySelection); } } } @@ -203,7 +205,7 @@ public class SelectionModel { * @return 否 */ public boolean pasteFromClipBoard() { - FormSelection pasteSelection = ClipboardFilter.paste(clipboard); + FormSelection pasteSelection = ClipboardFilter.paste(formClipboard.getClipboard()); if (pasteSelection != null && !pasteSelection.isEmpty()) { if (!hasSelectedPasteSource()) { //未选 @@ -240,7 +242,7 @@ public class SelectionModel { //编辑器外面还有两层容器,使用designer.getRootComponent()获取到的是编辑器中层的容器,不是编辑器表层 //当前选择的就是编辑器表层 FormSelectionUtils.paste2Container(designer, (XLayoutContainer) selection.getSelectedCreator(), - clipboard, + formClipboard.getClipboard(), DELTA_X_Y, DELTA_X_Y); } @@ -248,7 +250,7 @@ public class SelectionModel { //cpt本地组件复用,编辑器就一层,是最底层,使用designer.getRootComponent()就可以获取到 //使用selection.getSelectedCreator()也应该是可以获取到的。 FormSelectionUtils.paste2Container(designer, designer.getRootComponent(), - clipboard, + formClipboard.getClipboard(), DELTA_X_Y, DELTA_X_Y); } @@ -266,7 +268,7 @@ public class SelectionModel { if (hasSelectedPasteSource()) { selectedPaste(); } else { - FormSelectionUtils.paste2Container(designer, container, clipboard, + FormSelectionUtils.paste2Container(designer, container, formClipboard.getClipboard(), rectangle.x + rectangle.width / 2, rectangle.y + DELTA_X_Y); } @@ -281,7 +283,7 @@ public class SelectionModel { selectedPaste(); } else { FormSelectionUtils.paste2Container(designer, designer.getRootComponent(), - clipboard, + formClipboard.getClipboard(), rectangle.x + rectangle.width / 2, rectangle.y + DELTA_X_Y); } @@ -314,13 +316,13 @@ public class SelectionModel { positionX = selectionRec.x - containerRec.x + selectionRec.width / 2; positionY = (int) (selectionRec.y - containerRec.y + selectionRec.height * OFFSET_RELATIVE); } - FormSelectionUtils.paste2Container(designer, container, clipboard, positionX, positionY); + FormSelectionUtils.paste2Container(designer, container, formClipboard.getClipboard(), positionX, positionY); } else if (container != null && selection.getSelectedCreator().getParent() instanceof XWAbsoluteLayout) { //绝对布局 Rectangle rec = selection.getSelctionBounds(); - FormSelectionUtils.paste2Container(designer, container, clipboard, rec.x + DELTA_X_Y, rec.y + DELTA_X_Y); + FormSelectionUtils.paste2Container(designer, container, formClipboard.getClipboard(), rec.x + DELTA_X_Y, rec.y + DELTA_X_Y); } else if (isExtraContainer(container)) { - provider.paste2Container(clipboard); + provider.paste2Container(formClipboard.getClipboard()); } } From fde70048f5afc823badc0ac2e085bfc4f8806e25 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 3 Jan 2023 10:19:06 +0800 Subject: [PATCH 16/16] =?UTF-8?q?REPORT-82895=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20=E6=89=93=E5=BC=80=E6=8A=A5=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/report/freeze/FreezeAndRepeatPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java index cf32a24b65..a946b63b16 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java @@ -87,7 +87,7 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane { private void updateEndValue() { - if (end instanceof UISpinner) { + if (end instanceof UISpinner && start instanceof UISpinner) { ((UISpinner) end).setMinValue(((UISpinner) start).getValue()); ((UISpinner) end).setValue(((UISpinner) end).getValue());