From b3e55a4fdd64f60a5bb7553d9b30fe1ff7452dc5 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Mon, 18 Oct 2021 15:47:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?REPORT-59814=20=E7=BB=84=E4=BB=B6=E5=9F=8B?= =?UTF-8?q?=E7=82=B9=20groupingDetail=20=E8=BF=94=E5=9B=9E=E6=A6=82?= =?UTF-8?q?=E7=8E=87=E6=98=AF=E7=A9=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/collect/ComponentCollector.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 3ea805deb..2c24cdf57 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -288,12 +288,17 @@ public class ComponentCollector implements XMLable { private JSONArray getGroupingDetail() { JSONArray ja = JSONFactory.createJSON(JSON.ARRAY); - Group[] groups = DefaultShareGroupManager.getInstance().getAllGroup(); - for(Group group : groups) { - JSONObject jo = JSONFactory.createJSON(JSON.OBJECT); - jo.put(GROUP_NAME, group.getGroupName()); - jo.put(CONTAIN_AMOUNT, group.getAllBindInfoList().length); - ja.add(jo); + try { + DefaultShareGroupManager.getInstance().refresh(); + Group[] groups = DefaultShareGroupManager.getInstance().getAllGroup(); + for(Group group : groups) { + JSONObject jo = JSONFactory.createJSON(JSON.OBJECT); + jo.put(GROUP_NAME, group.getGroupName()); + jo.put(CONTAIN_AMOUNT, group.getAllBindInfoList().length); + ja.add(jo); + } + } catch (Exception e) { + e.printStackTrace(); } return ja; } From bd4d66f66cb73fe01206c9916ae902672a027756 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 19 Oct 2021 09:44:08 +0800 Subject: [PATCH 2/8] =?UTF-8?q?REPORT-59814=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/share/collect/ComponentCollector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java index 2c24cdf57..47b7dc7ef 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/share/collect/ComponentCollector.java @@ -298,7 +298,7 @@ public class ComponentCollector implements XMLable { ja.add(jo); } } catch (Exception e) { - e.printStackTrace(); + FineLoggerFactory.getLogger().error(e.getMessage()); } return ja; } From 930d95a4528ebe1748f92a406c39ea87a1fee189 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 28 Oct 2021 17:42:02 +0800 Subject: [PATCH 3/8] =?UTF-8?q?REPORT-61736=20=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=83=8C=E6=99=AF=E6=8F=92=E5=85=A5=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=A1=86=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java index 452deb5c8..fc4b8e368 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java @@ -163,6 +163,8 @@ public class JavaFxNativeFileChooser implements FileChooserProvider { try { latch.await(); } catch (InterruptedException ignore) { + } finally { + setShowDialogState(false); } return selectedFiles.length > 0 ? JFileChooser.APPROVE_OPTION : JFileChooser.CANCEL_OPTION; } From 62ef8a99b1ecf184ea9520b7c72f64422721ac8e Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 2 Nov 2021 19:02:16 +0800 Subject: [PATCH 4/8] =?UTF-8?q?REPORT-61654=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E9=9D=9E=E4=B8=AD=E6=96=87=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E7=BC=BA=E5=A4=B1=E6=A3=80=E6=B5=8B=E7=9A=84?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index 5615b3555..96a966f8b 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -1,5 +1,5 @@ com.fr.design.mainframe.check.CheckButton=230*118 -com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185 +com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=550*185 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 com.fr.env.RemoteEnvPane.dialog=458*132 From 6c33a708599a073dd546368d395afa42799ff2fd Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 3 Nov 2021 11:34:06 +0800 Subject: [PATCH 5/8] =?UTF-8?q?REPORT-61654=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E9=9D=9E=E4=B8=AD=E6=96=87=E8=AE=BE=E8=AE=A1=E5=99=A8-?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E7=BC=BA=E5=A4=B1=E6=A3=80=E6=B5=8B=E7=9A=84?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/com/fr/design/i18n/dimension_en.properties | 2 +- .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 2 +- .../main/resources/com/fr/design/i18n/dimension_zh.properties | 2 +- .../resources/com/fr/design/i18n/dimension_zh_TW.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index 686c3da8a..786fe2ad0 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=305*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=630*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=630*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=570*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280 com.fr.design.report.ReportColumnsPane=800*600 com.fr.env.RemoteEnvPane.dialog=458*132 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 5937b272a..0956fa79d 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=280*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=550*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=430*95 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties index c507fcc08..931b79b44 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties @@ -1,7 +1,7 @@ # \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height com.fr.design.mainframe.check.CheckButton=250*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index 8a383a438..8ea7fd7c2 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -1,6 +1,6 @@ com.fr.design.mainframe.check.CheckButton=250*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=325*31 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 From 6026f0d575fd41c4ce7f68da6ee22e5f63bf8e82 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 3 Nov 2021 15:47:22 +0800 Subject: [PATCH 6/8] =?UTF-8?q?REPORT-60887=20MAC=20OS=20x=E7=94=B5?= =?UTF-8?q?=E8=84=91=E4=B8=8A=20=E7=BC=96=E8=BE=91=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=A3=98=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/creator/XCreator.java | 3 ++ .../designer/ui/PopupDialogContext.java | 47 +++++++++++++++++++ .../designer/ui/SelectedPopupDialog.java | 17 +++++++ 3 files changed, 67 insertions(+) create mode 100644 designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 87a1926cb..86db17a11 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -11,6 +11,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.beans.models.SelectionModel; +import com.fr.design.designer.ui.PopupDialogContext; import com.fr.design.designer.ui.SelectedPopupDialog; import com.fr.design.fun.ShareWidgetUIProcessor; import com.fr.design.fun.WidgetPropertyUIProvider; @@ -778,6 +779,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo if (popup == null) { popup = new SelectedPopupDialog(this, designer); } + PopupDialogContext.checkSelectedPop(this); JFrame frame = LogMessageBar.getInstance().getLogFrame(); if (frame!= null && frame.isActive()) { return; @@ -876,6 +878,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo if (popup != null) { popup.setVisible(false); } + PopupDialogContext.checkSelectedPop(this); } public void processPopup(boolean canVisible) { diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java b/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java new file mode 100644 index 000000000..06fb2cb76 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/designer/ui/PopupDialogContext.java @@ -0,0 +1,47 @@ +package com.fr.design.designer.ui; + +import com.fr.design.designer.creator.XCreator; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + + +/** + * 把弹窗统一管理起来 防止出现异常情况下游离的弹窗 + * + * @author hades + * @version 10.0 + * Created by hades on 2021/11/02 + */ +public class PopupDialogContext { + + private static List dialogs = new ArrayList<>(); + + public static void add(SelectedPopupDialog selectedPopupDialog) { + if (dialogs.contains(selectedPopupDialog)) { + return; + } + dialogs.add(selectedPopupDialog); + } + + public static void remove(SelectedPopupDialog selectedPopupDialog) { + dialogs.remove(selectedPopupDialog); + } + + public static void checkSelectedPop(XCreator creator) { + Iterator iterator = dialogs.iterator(); + List removedDialog = new ArrayList<>(); + while (iterator.hasNext()) { + SelectedPopupDialog dialog = iterator.next(); + if (dialog.isVisible() && creator != dialog.getCreator()) { + iterator.remove(); + removedDialog.add(dialog); + } + } + for (SelectedPopupDialog dialog : removedDialog) { + dialog.setVisible(false); + } + } + +} diff --git a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java index 44978ad66..22f0d3760 100644 --- a/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java +++ b/designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java @@ -25,11 +25,14 @@ public class SelectedPopupDialog extends JDialog { private boolean canVisible = true; + private final XCreator creator; + public SelectedPopupDialog(XCreator creator, FormDesigner designer) { super(OperatingSystem.isMacos() ? new JFrame() : DesignerContext.getDesignerFrame()); this.setUndecorated(true); this.setModal(false); this.setFocusableWindowState(false); + this.creator = creator; controlPanel = new PopupControlPanel(creator, designer); this.getContentPane().add(controlPanel); this.setSize(controlPanel.getDefaultDimension()); @@ -44,6 +47,16 @@ public class SelectedPopupDialog extends JDialog { return controlPanel.hasVisibleButtons(); } + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + PopupDialogContext.add(this); + } else { + PopupDialogContext.remove(this); + } + } + public void setRelativeBounds(Rectangle rectangle) { this.controlPanel.setRelativeBounds(rectangle); } @@ -55,4 +68,8 @@ public class SelectedPopupDialog extends JDialog { public void setCanVisible(boolean canVisible) { this.canVisible = canVisible; } + + public XCreator getCreator() { + return this.creator; + } } From 9df5abe79cdb5a4b4334afbe0aae157db6139750 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 4 Nov 2021 10:22:07 +0800 Subject: [PATCH 7/8] =?UTF-8?q?REPORT-61306=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=97=B6=EF=BC=8C=E6=98=BE=E7=A4=BA=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E7=9A=84=E5=BC=B9=E7=AA=97=E6=9C=AA=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=86=85=E9=83=A8=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E6=98=AF=E5=9B=BA=E5=AE=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9C=A8=E5=8F=B3=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/notification/ui/NotificationCenterDialog.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java index 10e10ecdb..2541d04b4 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -2,6 +2,7 @@ package com.fr.design.notification.ui; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.notification.Notification; import com.fr.design.notification.NotificationCenter; import java.awt.BorderLayout; @@ -119,7 +120,7 @@ public class NotificationCenterDialog extends JDialog { if (winSize.width > screenSize.width) { winSize.width = screenSize.width; } - //这里设置位置:水平居中,竖直偏上 - win.setLocation(screenSize.width - winSize.width - 90, 50); + win.setLocation((DesignerContext.getDesignerFrame().getWidth() - winSize.width - 100 + DesignerContext.getDesignerFrame().getX()), + DesignerContext.getDesignerFrame().getY() + winSize.height); } } From ab86d37db01776bd73c7b9a5d0f3e6b25fc7f401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Thu, 4 Nov 2021 16:31:10 +0800 Subject: [PATCH 8/8] =?UTF-8?q?REPORT-59744=20=E8=81=9A=E5=90=88=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E6=89=8B=E5=8A=A8=E4=BF=AE=E6=94=B9=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BB=A5=E5=90=8E=EF=BC=8C=E7=82=B9=E5=87=BB=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E5=A4=84=E4=BD=8D=E7=BD=AE=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/poly/group/PolyBoundsGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java index aadeb0178..599a14f44 100644 --- a/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java +++ b/designer-realize/src/main/java/com/fr/poly/group/PolyBoundsGroup.java @@ -52,7 +52,7 @@ public class PolyBoundsGroup implements GroupModel { @Override public Object getValue(int row, int column) { UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); if (column == 0) { switch (row) { case 0: @@ -83,7 +83,7 @@ public class PolyBoundsGroup implements GroupModel { if (column == 1) { int v = value == null ? 0 : ((Number) value).intValue(); UnitRectangle ur = block.getBounds(); - Rectangle r = ur.toRectangle(resolution); + Rectangle r = ur.toRoundRectangle(resolution); switch (row) { case 0: r.x = v;