From aa72606df7fa7b50af53b20e6bc6b24628a2096e Mon Sep 17 00:00:00 2001 From: xiqiu Date: Wed, 2 Jun 2021 18:33:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-52987=20=20=E4=BF=AE=E5=A4=8Dkerbero?= =?UTF-8?q?s=E8=AE=A4=E8=AF=81=E4=B8=8B=E6=9A=B4=E9=9C=B2=E7=9A=84throwabl?= =?UTF-8?q?e=E5=92=8C=E9=A9=B1=E5=8A=A8=E5=8A=A0=E8=BD=BD=E4=BC=98?= =?UTF-8?q?=E5=85=88=E7=BA=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/connect/DatabaseConnectionPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 18f4d94405..f3a97ffb1c 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -136,8 +136,8 @@ public abstract class DatabaseConnectionPane Date: Thu, 3 Jun 2021 17:10:56 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=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 --- .../design/mainframe/check/CheckButton.java | 17 ++++++++++++++- .../mainframe/check/CheckFontInfoDialog.java | 21 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java index e55f9a4817..b2fc99359d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.file.FILE; import com.fr.file.FileNodeFILE; +import com.fr.general.GeneralContext; import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; @@ -27,6 +28,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.util.Locale; import java.util.Set; import java.util.concurrent.ExecutionException; @@ -194,7 +196,7 @@ public class CheckButton extends UIButton { dialog = new JDialog(); dialog.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font")); dialog.setModal(true); - dialog.setSize(new Dimension(268, 118)); + dialog.setSize(new Dimension(getDialogWidth(), 118)); JPanel jp = new JPanel(); JPanel upPane = new JPanel(); JPanel downPane = new JPanel(); @@ -211,4 +213,17 @@ public class CheckButton extends UIButton { dialog.setResizable(false); dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(this)); } + + private int getDialogWidth() { + Locale locale = GeneralContext.getLocale(); + if (locale.equals(Locale.US)) { + return 305; + } else if (locale.equals(Locale.JAPAN)) { + return 280; + } else if (locale.equals(Locale.KOREA)) { + return 230; + } else { + return 250; + } + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index 0d5771a494..752bf12a57 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java @@ -52,7 +52,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"), Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"), CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); - linkMessage.setPreferredSize(new Dimension(380, 31)); + linkMessage.setPreferredSize(new Dimension(getPaneWidth(), 31)); messagePanel.add(linkMessage); // 查看详情按钮 @@ -89,11 +89,11 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { public void mouseClicked(MouseEvent e) { if (hiddenPanel.isVisible()) { hiddenPanel.setVisible(false); - CheckFontInfoDialog.this.setSize(new Dimension(380, 185)); + CheckFontInfoDialog.this.setSize(new Dimension(getPaneWidth(), 185)); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right")); } else { - CheckFontInfoDialog.this.setSize(new Dimension(380, 280)); + CheckFontInfoDialog.this.setSize(new Dimension(getPaneWidth(), 280)); hiddenPanel.setVisible(true); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down")); @@ -114,11 +114,24 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { this.add(topPanel, BorderLayout.NORTH); this.add(hiddenPanel, BorderLayout.CENTER); this.add(bottomPanel, BorderLayout.SOUTH); - this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 400:380, 185)); + this.setSize(new Dimension(getPaneWidth(), 185)); GUICoreUtils.centerWindow(this); } + private int getPaneWidth() { + Locale locale = GeneralContext.getLocale(); + if (locale.equals(Locale.US)) { + return 630; + } else if (locale.equals(Locale.JAPAN)) { + return 610; + } else if (locale.equals(Locale.KOREA)) { + return 490; + } else { + return 385; + } + } + @Override public void actionPerformed(ActionEvent e) { this.dispose(); From f0b03de062cecc49182128667000d2ef6e35b323 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Fri, 4 Jun 2021 14:53:19 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=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 --- .../design/mainframe/check/CheckButton.java | 33 +++++-------------- .../mainframe/check/CheckFontInfoDialog.java | 25 +++----------- .../fr/design/i18n/dimension_en.properties | 4 +++ .../fr/design/i18n/dimension_ja_JP.properties | 4 +++ .../fr/design/i18n/dimension_ko_KR.properties | 4 +++ .../fr/design/i18n/dimension_zh.properties | 4 +++ .../fr/design/i18n/dimension_zh_TW.properties | 4 +++ 7 files changed, 34 insertions(+), 44 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java index b2fc99359d..7757ea2f42 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java @@ -4,13 +4,14 @@ import com.fr.base.BaseUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.file.FILE; import com.fr.file.FileNodeFILE; -import com.fr.general.GeneralContext; +import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; @@ -22,13 +23,11 @@ import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; -import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import java.util.Locale; import java.util.Set; import java.util.concurrent.ExecutionException; @@ -42,7 +41,7 @@ public class CheckButton extends UIButton { private UILabel message; private UIButton okButton; private JDialog dialog; - private UILabel uiLabel; + private UILabel imageLabel; public CheckButton() { this.setIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/check.png")); @@ -73,7 +72,7 @@ public class CheckButton extends UIButton { } if (set.isEmpty()) { okButton.setEnabled(true); - uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png")); + imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png")); message.setText("" + Toolkit.i18nText("Fine_Designer_Check_Font_Success") + ""); } else { if (dialog != null) { @@ -163,7 +162,6 @@ public class CheckButton extends UIButton { }); checkThread.execute(); dialog.setVisible(true); - dialog.dispose(); } }; @@ -173,7 +171,7 @@ public class CheckButton extends UIButton { @Override public Void callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) { - uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png")); + imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png")); message.setText("" + Toolkit.i18nText("Fine_Designer_Check_Font_Upgrade") + ""); okButton.setEnabled(true); return null; @@ -185,7 +183,7 @@ public class CheckButton extends UIButton { private void initDialogPane() { message = new UILabel(); message.setText(Toolkit.i18nText("Fine-Designer_Check_Font_Checking") + "..."); - uiLabel = new UILabel(); + imageLabel = new UILabel(); okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); okButton.setEnabled(false); okButton.addActionListener(new ActionListener() { @@ -196,13 +194,13 @@ public class CheckButton extends UIButton { dialog = new JDialog(); dialog.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font")); dialog.setModal(true); - dialog.setSize(new Dimension(getDialogWidth(), 118)); + dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension(this.getClass().getName())); JPanel jp = new JPanel(); JPanel upPane = new JPanel(); JPanel downPane = new JPanel(); - uiLabel = new UILabel(BaseUtils.readIcon("com/fr/design/images/waiting.png")); + imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/waiting.png")); upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10)); - upPane.add(uiLabel); + upPane.add(imageLabel); upPane.add(message); downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0)); downPane.add(okButton); @@ -213,17 +211,4 @@ public class CheckButton extends UIButton { dialog.setResizable(false); dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor(this)); } - - private int getDialogWidth() { - Locale locale = GeneralContext.getLocale(); - if (locale.equals(Locale.US)) { - return 305; - } else if (locale.equals(Locale.JAPAN)) { - return 280; - } else if (locale.equals(Locale.KOREA)) { - return 230; - } else { - return 250; - } - } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java index 752bf12a57..0671ed1b63 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java @@ -3,11 +3,11 @@ package com.fr.design.mainframe.check; import com.fr.design.dialog.link.MessageWithLink; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.CloudCenter; -import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import javax.swing.BorderFactory; @@ -17,13 +17,11 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.UIManager; import java.awt.BorderLayout; -import java.awt.Dimension; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.Locale; /** * 字体缺失检测的具体结果对话框 @@ -52,7 +50,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"), Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"), CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); - linkMessage.setPreferredSize(new Dimension(getPaneWidth(), 31)); + linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink")); messagePanel.add(linkMessage); // 查看详情按钮 @@ -89,11 +87,11 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { public void mouseClicked(MouseEvent e) { if (hiddenPanel.isVisible()) { hiddenPanel.setVisible(false); - CheckFontInfoDialog.this.setSize(new Dimension(getPaneWidth(), 185)); + CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse")); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right")); } else { - CheckFontInfoDialog.this.setSize(new Dimension(getPaneWidth(), 280)); + CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.unfold")); hiddenPanel.setVisible(true); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down")); @@ -114,24 +112,11 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener { this.add(topPanel, BorderLayout.NORTH); this.add(hiddenPanel, BorderLayout.CENTER); this.add(bottomPanel, BorderLayout.SOUTH); - this.setSize(new Dimension(getPaneWidth(), 185)); + this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse")); GUICoreUtils.centerWindow(this); } - private int getPaneWidth() { - Locale locale = GeneralContext.getLocale(); - if (locale.equals(Locale.US)) { - return 630; - } else if (locale.equals(Locale.JAPAN)) { - return 610; - } else if (locale.equals(Locale.KOREA)) { - return 490; - } else { - return 385; - } - } - @Override public void actionPerformed(ActionEvent e) { this.dispose(); 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 1cafa6d35d..23abf1ba42 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 +1,5 @@ +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.unfold=630*280 com.fr.design.report.ReportColumnsPane=800*600 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 e69de29bb2..97c7a38b66 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 @@ -0,0 +1,4 @@ +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.unfold=610*280 \ No newline at end of file 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 e69de29bb2..4ebb3e1edc 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 @@ -0,0 +1,4 @@ +com.fr.design.mainframe.check.CheckButton=230*118 +com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 \ No newline at end of file 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 69c2fcef48..85eb5c5525 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 +1,5 @@ # \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.unfold=385*280 \ No newline at end of file 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 e69de29bb2..d6bdbbc64a 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 @@ -0,0 +1,4 @@ +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.unfold=385*280 \ No newline at end of file From 7de187ff092d574937cda40aa508bde9fd5b0afa Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Mon, 7 Jun 2021 11:26:59 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=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 4ebb3e1edc..c00c5eb621 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,4 +1,4 @@ com.fr.design.mainframe.check.CheckButton=230*118 com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185 -com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*31 +com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 \ No newline at end of file