From 4f5e0d03af87a379c41502d67d61a297c13b4d07 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 21 Jan 2022 10:02:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-65950=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=89=93=E5=BC=8011.0=E6=A8=A1=E6=9D=BF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=85=A8=E5=B1=80=E6=A0=B7=E5=BC=8F=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E5=92=8C=E5=A4=A7=E7=89=88=E6=9C=AC=E4=B8=8D=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E7=AA=97=E9=A1=BA=E5=BA=8F=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/dialog/InformationWarnPane.java | 11 +++++++++++ .../main/java/com/fr/design/mainframe/JTemplate.java | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java index aac7461c3..ec912fdd9 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java @@ -37,6 +37,17 @@ public class InformationWarnPane extends JPanel{ public void show() { showWindow(SwingUtilities.getWindowAncestor(this)).setVisible(true); } + + public void showOnTop() { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + AlertDialog dialog = showWindow(SwingUtilities.getWindowAncestor(InformationWarnPane.this)); + dialog.setAlwaysOnTop(true); + dialog.setVisible(true); + } + }); + } public InformationWarnPane(String infor, String moreInfo, String title) { this.title = title; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 2975eaca4..1876b469f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1096,7 +1096,7 @@ public abstract class JTemplate> String info = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Open-New_Form_Tip"); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); + new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnTop(); } return true; } @@ -1119,7 +1119,7 @@ public abstract class JTemplate> String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion)); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); + new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnTop(); } return true; } From 6faea50c92f15da2259b54507cf545e9cee58f70 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 21 Jan 2022 15:48:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-65950=20fix=20=E6=94=B9=E6=88=90toFr?= =?UTF-8?q?ont?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/dialog/InformationWarnPane.java | 4 ++-- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java index ec912fdd9..e64133eea 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java +++ b/designer-base/src/main/java/com/fr/design/dialog/InformationWarnPane.java @@ -38,13 +38,13 @@ public class InformationWarnPane extends JPanel{ showWindow(SwingUtilities.getWindowAncestor(this)).setVisible(true); } - public void showOnTop() { + public void showOnFront() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { AlertDialog dialog = showWindow(SwingUtilities.getWindowAncestor(InformationWarnPane.this)); - dialog.setAlwaysOnTop(true); dialog.setVisible(true); + dialog.toFront(); } }); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 1876b469f..6e8b02000 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1096,7 +1096,7 @@ public abstract class JTemplate> String info = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Open-New_Form_Tip"); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnTop(); + new InformationWarnPane(info, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnFront(); } return true; } @@ -1119,7 +1119,7 @@ public abstract class JTemplate> String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion)); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); if (showTipPane) { - new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnTop(); + new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).showOnFront(); } return true; }