From 97490a81162ed5bc1859032c5f238c578fdf3eae Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 10 Oct 2022 15:22:07 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-75998=20=E6=B7=BB=E5=8A=A0=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../replace/ui/ITReplaceMainDialog.java | 3 +- .../replace/ui/ITReplaceWestPanel.java | 55 +++++++++++++++---- .../actions/replace/ui/ITTableEditor.java | 2 +- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java index 54e6a3bff4..9a2f5c8de7 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java @@ -23,7 +23,6 @@ import com.fr.stable.StringUtils; import javax.swing.JOptionPane; import javax.swing.JPanel; import java.awt.BorderLayout; -import java.awt.Color; import java.awt.Dimension; import java.awt.Point; import java.awt.event.ActionEvent; @@ -153,7 +152,7 @@ public class ITReplaceMainDialog extends UIDialog { }); center.add(northPane.getScrollPane(), BorderLayout.NORTH); center.add(southPanel.getTableEditorPane(), BorderLayout.CENTER); - add(westPanel.getLeftJpanel(), BorderLayout.WEST); + add(westPanel.getLeftPanel(), BorderLayout.WEST); //主体部分 add(center, BorderLayout.CENTER); center.setVisible(true); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index 9295baf655..c88e3a19df 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -1,14 +1,22 @@ package com.fr.design.actions.replace.ui; +import com.fr.base.svg.IconUtils; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.share.ui.base.MouseClickListener; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; +import javax.swing.Icon; import javax.swing.JPanel; import java.awt.Color; +import java.awt.Cursor; +import java.awt.Desktop; +import java.awt.Font; import java.awt.GridLayout; +import java.awt.event.MouseEvent; +import java.net.URI; /** * 左侧面板 @@ -18,28 +26,53 @@ import java.awt.GridLayout; * created by Destiny.Lin on 2022-09-05 */ public class ITReplaceWestPanel { - JPanel leftJpanel; + private JPanel leftPanel; + private UILabel iconLabel; + private static final Icon HELP_ICON = IconUtils.readIcon("com/fr/design/images/buttonicon/replace_help.svg"); + private static final int FILL_COUNT = 13; public ITReplaceWestPanel() { - leftJpanel = new JPanel(new GridLayout(15, 1, 0, 0)); + leftPanel = new JPanel(new GridLayout(15, 1, 0, 0)); + iconLabel = new UILabel("" + Toolkit.i18nText("Fine-Design_Report_Community_Help") + ""); + UIToggleButton contentButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Basic_Templates_Content")); contentButton.setSelected(true); contentButton.setBorderPainted(false); - leftJpanel.add(contentButton); - leftJpanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, new Color(218, 218, 221))); + leftPanel.add(contentButton); + leftPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, new Color(218, 218, 221))); //填充一下面板 - int labelNum = 14; - for (int i = 0; i < labelNum; i++) { - leftJpanel.add(new UILabel(StringUtils.EMPTY)); + for (int i = 0; i < FILL_COUNT; i++) { + leftPanel.add(new UILabel(StringUtils.EMPTY)); } + + //添加帮助文档按钮及超链 + iconLabel.setIcon(HELP_ICON); + iconLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Tooltip")); + //设置游标 + iconLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); + iconLabel.setFont(new Font("Dialog", Font.BOLD, 12)); + iconLabel.addMouseListener(new MouseClickListener() { + @Override + public void mouseClicked(MouseEvent e) { + Desktop desktop = Desktop.getDesktop(); + try { + //创建URI统一资源标识符 + URI uri = new URI("https://help.fanruan.com/finereport/doc-view-4954.html"); + desktop.browse(uri); + } catch (Exception exception) { + exception.printStackTrace(); + } + } + }); + leftPanel.add(iconLabel); } - public JPanel getLeftJpanel() { - return leftJpanel; + public JPanel getLeftPanel() { + return leftPanel; } - public void setLeftJpanel(JPanel leftJpanel) { - this.leftJpanel = leftJpanel; + public void setLeftPanel(JPanel leftPanel) { + this.leftPanel = leftPanel; } } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java index 5c57e6d6a1..0c8819abff 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java @@ -102,8 +102,8 @@ public class ITTableEditor extends UITableModelAdapter { public void add(List list) { for (Info info : list) { addRow(info.getContent()); - fireTableDataChanged(); } + fireTableDataChanged(); } public enum ChooseIndex { From 8ee083f996c29c2c40947a765f4d0e2d3a3770d6 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 10 Oct 2022 15:26:42 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-75998=20=E6=B7=BB=E5=8A=A0=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3Icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/images/buttonicon/replace_help.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg new file mode 100644 index 0000000000..cfc3370a66 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg @@ -0,0 +1,3 @@ + + + From c218e9c130be7a8e682ab915d46635a3aca5239b Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 10 Oct 2022 15:31:13 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-75998=20=E6=9B=B4=E6=96=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/replace/ui/ITReplaceWestPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index c88e3a19df..5b48827511 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -5,6 +5,7 @@ import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.share.ui.base.MouseClickListener; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; @@ -61,7 +62,7 @@ public class ITReplaceWestPanel { URI uri = new URI("https://help.fanruan.com/finereport/doc-view-4954.html"); desktop.browse(uri); } catch (Exception exception) { - exception.printStackTrace(); + FineLoggerFactory.getLogger().error(exception.getMessage(), exception); } } }); From 1fdd0cac880d7c7b73831fd46660c5f7cc1c1769 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 10 Oct 2022 16:09:38 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-75998=20=E6=9B=B4=E6=94=B9=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=80=BB=E8=BE=91,=E6=9B=B4=E6=94=B9=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3Icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/images/buttonicon/replace_help.svg | 2 +- .../actions/replace/ui/ITReplaceWestPanel.java | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg b/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg index cfc3370a66..fdbd5eca5e 100644 --- a/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg +++ b/designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg @@ -1,3 +1,3 @@ - + diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index 5b48827511..3363b7db75 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -5,7 +5,8 @@ import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.share.ui.base.MouseClickListener; -import com.fr.log.FineLoggerFactory; +import com.fr.design.utils.BrowseUtils; +import com.fr.general.CloudCenter; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; @@ -13,11 +14,8 @@ import javax.swing.Icon; import javax.swing.JPanel; import java.awt.Color; import java.awt.Cursor; -import java.awt.Desktop; -import java.awt.Font; import java.awt.GridLayout; import java.awt.event.MouseEvent; -import java.net.URI; /** * 左侧面板 @@ -30,6 +28,7 @@ public class ITReplaceWestPanel { private JPanel leftPanel; private UILabel iconLabel; private static final Icon HELP_ICON = IconUtils.readIcon("com/fr/design/images/buttonicon/replace_help.svg"); + private static final String HELP_URL = CloudCenter.getInstance().acquireUrlByKind("design.replace.help", "https://help.fanruan.com/finereport/doc-view-4954.html"); private static final int FILL_COUNT = 13; public ITReplaceWestPanel() { @@ -52,18 +51,10 @@ public class ITReplaceWestPanel { iconLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Tooltip")); //设置游标 iconLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); - iconLabel.setFont(new Font("Dialog", Font.BOLD, 12)); iconLabel.addMouseListener(new MouseClickListener() { @Override public void mouseClicked(MouseEvent e) { - Desktop desktop = Desktop.getDesktop(); - try { - //创建URI统一资源标识符 - URI uri = new URI("https://help.fanruan.com/finereport/doc-view-4954.html"); - desktop.browse(uri); - } catch (Exception exception) { - FineLoggerFactory.getLogger().error(exception.getMessage(), exception); - } + BrowseUtils.browser(HELP_URL); } }); leftPanel.add(iconLabel); From 2973891f7b0ca8a53454ca73e8425727070ab90d Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 11 Oct 2022 11:14:02 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-75998=20=E4=BF=AE=E6=94=B9=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=96=87=E6=A1=A3=E7=BD=91=E5=9D=80=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/replace/ui/ITReplaceWestPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index 3363b7db75..a58091a06a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -28,7 +28,7 @@ public class ITReplaceWestPanel { private JPanel leftPanel; private UILabel iconLabel; private static final Icon HELP_ICON = IconUtils.readIcon("com/fr/design/images/buttonicon/replace_help.svg"); - private static final String HELP_URL = CloudCenter.getInstance().acquireUrlByKind("design.replace.help", "https://help.fanruan.com/finereport/doc-view-4954.html"); + private static final String HELP_URL = CloudCenter.getInstance().acquireUrlByKind("design.replace.help", "https://help.fanruan.com/finereport/doc-view-4954.html?source=3"); private static final int FILL_COUNT = 13; public ITReplaceWestPanel() { From 7f3dd21e666a69642e4a2fb844320a4e52c4555b Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 11 Oct 2022 11:36:25 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-81416=20=E5=AF=BC=E5=85=A5=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/carton/EventDispatchThreadHangMonitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java b/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java index f472d901a1..56ccaa2c48 100644 --- a/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java +++ b/designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java @@ -7,7 +7,6 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.ProductConstantsBase; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import com.fr.third.ibm.icu.text.SimpleDateFormat; import org.jetbrains.annotations.NotNull; import javax.swing.SwingUtilities; @@ -22,6 +21,7 @@ import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; +import java.text.SimpleDateFormat; import java.util.LinkedList; import java.util.Timer; import java.util.TimerTask;