From 90dfc04e35f3ef671dad5a56cd4ebcf86115d8cf Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 11 May 2021 15:07:52 +0800 Subject: [PATCH 01/17] =?UTF-8?q?REPORT-51188=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=9A=84tab=E5=9D=97=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E4=B8=8B=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=BC=A9=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/FormArea.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index f127f8ea0d..56458a4613 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -411,8 +411,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent { if (root.acceptType(XWFitLayout.class)) { XWFitLayout layout = (XWFitLayout) root; layout.setContainerPercent(value / DEFAULT_SLIDER); - traverAndAdjust(layout, percent); layout.adjustCreatorsWhileSlide(percent); + traverAndAdjust(layout, percent); // 拖动滑块,先将内部组件百分比大小计算,再计算容器大小 From 8a63698b8d600f3e07d16c8c0fba7be757c849a3 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 12 May 2021 16:35:45 +0800 Subject: [PATCH 02/17] =?UTF-8?q?REPORT-51830=20tab=E9=87=8C=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E8=AE=BE=E7=BD=AE=E5=9B=BE=E7=89=87=E8=83=8C?= =?UTF-8?q?=E6=99=AF=EF=BC=8C=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4=E5=BE=97?= =?UTF-8?q?=E5=88=B0=E7=9A=84tab=E9=87=8C=E7=9A=84=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E9=A2=84=E8=A7=88=E6=97=B6=E6=B2=A1=E6=9C=89=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E4=BA=86=EF=BC=8C=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=87=8C?= =?UTF-8?q?=E7=9C=8B=E6=98=AF=E6=9C=89=E5=9B=BE=E7=89=87=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E7=9A=84=E3=80=820228=E4=B9=9F=E6=9C=89=E6=AD=A4=E7=8E=B0?= =?UTF-8?q?=E8=B1=A1=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java index 0c6adeb090..932338a3fd 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java @@ -235,6 +235,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { } else { container.add(creator, creator.toData().getWidgetName(),0); } + //这边将组件添加到container后,需要做下layout处理,否则其内部的一些组件的宽高可能为0,从而导致在updateChildBounds的时候出现问题 + LayoutUtils.layoutRootContainer(creator); XWAbsoluteLayout layout = (XWAbsoluteLayout) container; layout.updateBoundsWidget(creator); updateCreatorBackBound(); From b6ab051906e053898fb6ce52825c11305663a5aa Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 13 May 2021 14:00:18 +0800 Subject: [PATCH 03/17] =?UTF-8?q?REPORT-51188=20=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=9A=84tab=E5=9D=97=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E4=B8=8B=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=BC=A9=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/FormArea.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index 56458a4613..d45e393f89 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -447,9 +447,9 @@ public class FormArea extends JComponent implements ScrollRulerComponent { if (root.acceptType(XWFitLayout.class)) { XWFitLayout layout = (XWFitLayout) root; layout.setContainerPercent(1.0); - traverAndAdjust(layout, 0.0); - layout.adjustCreatorsWhileSlide(0.0); + layout.adjustCreatorsWhileSlide(0.0); + traverAndAdjust(layout, 0.0); // 拖动滑块,先将内部组件百分比大小计算,再计算容器大小 Dimension d = new Dimension(layout.getWidth(), layout.getHeight()); From c99f38a8692cf88f624828a7707b989ff6892aaf Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 13 May 2021 16:43:38 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/XWFitLayout.java | 2 +- .../com/fr/design/mainframe/FormArea.java | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java index 6d55c658f2..6d7aa5d9ff 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java @@ -121,7 +121,7 @@ public class XWFitLayout extends XLayoutContainer { * 更新组件的backupBound * 拖动滑块改变容器大小,改变的是界面显示大小,更新bound,再次拖入或拉伸边框用到 */ - private void updateCreatorsBackupBound() { + public void updateCreatorsBackupBound() { for (int i=0,size=this.getComponentCount(); i Date: Fri, 14 May 2021 14:45:55 +0800 Subject: [PATCH 05/17] =?UTF-8?q?REPORT-52087=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=85=83=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=E4=B8=AD?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E4=BF=AE=E6=94=B9=E5=AD=97=E7=AC=A6=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/icombobox/LazyComboBox.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index 300790457a..e1e1600790 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -55,12 +55,14 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen @Override public void setSelectedItem(Object anObject) { - initialSelected = anObject; if (loaded) { super.setSelectedItem(anObject); } else { - this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); + if (initialSelected == null) { + this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); + } super.setSelectedItem(anObject); + initialSelected = anObject; } } From 7bceb1fb2cbcb90a05eab81a6f5df30cca732b06 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 14 May 2021 15:06:44 +0800 Subject: [PATCH 06/17] =?UTF-8?q?REPORT-52087=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=85=83=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=E4=B8=AD?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E4=BF=AE=E6=94=B9=E5=AD=97=E7=AC=A6=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index e1e1600790..36b8eb2c19 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -62,8 +62,8 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); } super.setSelectedItem(anObject); - initialSelected = anObject; } + initialSelected = anObject; } @Override From 97d69685db84a000aeb8555a492ea3e1a5d36d0b Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 14 May 2021 16:55:47 +0800 Subject: [PATCH 07/17] =?UTF-8?q?REPORT-49014=20=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=B8=AA=E8=BF=9C=E7=A8=8B=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=97=B6=E5=8F=8C=E5=87=BB=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=B8=AA=E6=A8=A1=E6=9D=BF=20=E4=B8=80?= =?UTF-8?q?=E4=BA=BA=E6=AD=A3=E5=B8=B8=E6=89=93=E5=BC=80=20=E4=B8=80?= =?UTF-8?q?=E4=BA=BA=E6=89=93=E5=BC=80=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/TemplateLockedHandler.java | 27 +++++++++++++++++++ .../com/fr/design/mainframe/app/CptApp.java | 2 ++ .../com/fr/design/mainframe/app/FormApp.java | 2 ++ .../com/fr/design/mainframe/app/XlsApp.java | 2 ++ .../com/fr/design/mainframe/app/XlsxApp.java | 2 ++ 5 files changed, 35 insertions(+) create mode 100644 designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java b/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java new file mode 100644 index 0000000000..516cb4ceb0 --- /dev/null +++ b/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java @@ -0,0 +1,27 @@ +package com.fr.design.mainframe; + +import com.fr.design.dialog.FineJOptionPane; +import com.fr.design.i18n.Toolkit; +import com.fr.design.ui.util.UIUtil; + +/** + * @author hades + * @version 10.0 + * Created by hades on 2021/5/14 + */ +public class TemplateLockedHandler { + + public static void generateTipAndRefresh() { + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Basic_Template_Locked_Tip"), + Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), + FineJOptionPane.WARNING_MESSAGE); + DesignerFrameFileDealerPane.getInstance().refresh(); + } + }); + } + +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java index 4e9980a499..431b401fc9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java @@ -13,6 +13,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DecodeDialog; +import com.fr.design.mainframe.TemplateLockedHandler; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.exception.DecryptTemplateException; @@ -68,6 +69,7 @@ class CptApp extends AbstractWorkBookApp { FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); } catch (TplLockedException exp) { FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); + TemplateLockedHandler.generateTipAndRefresh(); } catch (Exception exp) { FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java index 02692c991c..4100a03c87 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.DecodeDialog; import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.TemplateLockedHandler; import com.fr.design.worker.open.OpenResult; import com.fr.design.worker.open.OpenWorker; import com.fr.exception.DecryptTemplateException; @@ -106,6 +107,7 @@ class FormApp extends AbstractAppProvider { FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); } catch (TplLockedException exp) { FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); + TemplateLockedHandler.generateTipAndRefresh(); } catch (Exception exp) { FineLoggerFactory.getLogger().error("Failed to generate frm from " + file, exp); return null; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java index 3741f8b35d..5b135ccdfe 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.app; import com.fr.base.extension.FileExtension; import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.TemplateLockedHandler; import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.exception.TplLockedException; import com.fr.file.FILE; @@ -30,6 +31,7 @@ class XlsApp extends AbstractWorkBookApp { FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp); } catch (TplLockedException exp) { FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); + TemplateLockedHandler.generateTipAndRefresh(); } catch (Exception exp) { FineLoggerFactory.getLogger().error("Failed to generate xls from " + tplFile, exp); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java index 9d66cffb8f..f5a5498cf8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.app; import com.fr.base.extension.FileExtension; import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.TemplateLockedHandler; import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.exception.TplLockedException; import com.fr.file.FILE; @@ -31,6 +32,7 @@ class XlsxApp extends AbstractWorkBookApp { FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp); } catch (TplLockedException exp) { FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); + TemplateLockedHandler.generateTipAndRefresh(); } catch (Exception exp) { FineLoggerFactory.getLogger().error("Failed to generate xlsx from " + tplFile, exp); } From 9cbe4baef8a20b47b5d3fc4c9422a856f18cc4f9 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 14 May 2021 18:21:33 +0800 Subject: [PATCH 08/17] =?UTF-8?q?REPORT-49014=20update=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=8B=E5=9B=BD=E9=99=85=E5=8C=96key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/TemplateLockedHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java b/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java index 516cb4ceb0..7eb6eec5c7 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java @@ -16,7 +16,7 @@ public class TemplateLockedHandler { @Override public void run() { FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Toolkit.i18nText("Fine-Design_Basic_Template_Locked_Tip"), + Toolkit.i18nText("Fine_Designer_Remote_Design_Locked_Message"), Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), FineJOptionPane.WARNING_MESSAGE); DesignerFrameFileDealerPane.getInstance().refresh(); From b9dea208341a3eadf8078a5e98c06956cd3779fe Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 18 May 2021 15:32:37 +0800 Subject: [PATCH 09/17] =?UTF-8?q?REPORT-52087=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=85=83=E7=B4=A0=E6=95=B0=E6=8D=AE=E5=88=97=E4=B8=AD?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E4=BF=AE=E6=94=B9=E5=AD=97=E7=AC=A6=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/icombobox/LazyComboBox.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java index 36b8eb2c19..61df2c9c68 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java @@ -55,15 +55,19 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen @Override public void setSelectedItem(Object anObject) { + initialSelected = anObject; if (loaded) { super.setSelectedItem(anObject); } else { - if (initialSelected == null) { - this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); - } + this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject})); super.setSelectedItem(anObject); } + + } + + private void setSelectedItemWithDocumentChange(Object anObject) { initialSelected = anObject; + super.setSelectedItem(anObject); } @Override @@ -185,7 +189,7 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen } filtering = true; String xx = textField.getText(); - LazyComboBox.this.setSelectedItem(xx); + LazyComboBox.this.setSelectedItemWithDocumentChange(xx); this.item = textField.getText(); setPopupVisible(true); From 41f218bea02f51585a0be5a84d71ffebc74c543e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 21 May 2021 20:41:03 +0800 Subject: [PATCH 10/17] =?UTF-8?q?REPORT-52264=20=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=BC=96=E8=BE=91=E8=AD=A6=E5=91=8A=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=B8=8D=E5=9C=A8=E9=A1=B5=E9=9D=A2=E4=B8=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/MutilTempalteTabPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index bfe0320c45..b52c641c2b 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -967,7 +967,7 @@ public class MutilTempalteTabPane extends JComponent { //如果在权限编辑情况下,不允许切换到表单类型的工作簿 if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) { DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex)); - FineJOptionPane.showMessageDialog(MutilTempalteTabPane.this, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE); MutilTempalteTabPane.this.repaint(); return; From cb474f5d121a3873c4eedbb09614e18d37e3bf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 25 May 2021 10:37:58 +0800 Subject: [PATCH 11/17] =?UTF-8?q?REPORT-52264=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=9A=84=E7=88=B6=E7=AA=97=E5=8F=A3=E4=B8=BA?= =?UTF-8?q?DesignerContext.getDesignerFrame()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/file/MutilTempalteTabPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index b52c641c2b..9fa676f94e 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -967,7 +967,7 @@ public class MutilTempalteTabPane extends JComponent { //如果在权限编辑情况下,不允许切换到表单类型的工作簿 if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) { DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex)); - FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE); MutilTempalteTabPane.this.repaint(); return; From f9c4b5fe4470e1c437fda20c6caee8a124fdc37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 1 Jun 2021 11:22:42 +0800 Subject: [PATCH 12/17] =?UTF-8?q?REPORT-52933=20[=E9=98=BB=E6=AD=A2]?= =?UTF-8?q?=E4=BF=AE=E6=94=B9log=E5=AF=BC=E5=87=BA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=90=8E=EF=BC=8Clog=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/DesignerEnvManager.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index b8951ea8ba..e5a8e7cf4f 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -15,20 +15,18 @@ import com.fr.design.env.DesignerWorkspaceType; import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.env.RemoteDesignerWorkspaceInfo; import com.fr.design.file.HistoryTemplateListPane; -import com.fr.design.fun.DesignerPortProvider; import com.fr.design.i18n.Toolkit; import com.fr.design.locale.impl.ProductImproveMark; import com.fr.design.mainframe.vcs.VcsConfigManager; import com.fr.design.notification.SnapChatConfig; import com.fr.design.port.DesignerPortContext; -import com.fr.design.update.push.DesignerPushUpdateConfigManager; import com.fr.design.style.color.ColorSelectConfigManager; +import com.fr.design.update.push.DesignerPushUpdateConfigManager; import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignerPort; import com.fr.exit.DesignerExiter; import com.fr.file.FILEFactory; import com.fr.general.ComparatorUtils; -import com.fr.general.FRLogFormatter; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.SupportLocale; @@ -36,15 +34,14 @@ import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleMark; import com.fr.general.xml.GeneralXMLTools; import com.fr.log.FineLoggerFactory; +import com.fr.log.LogHandler; import com.fr.stable.CommonUtils; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; -import com.fr.stable.EnvChangedListener; import com.fr.stable.ListMap; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import com.fr.stable.bridge.StableFactory; import com.fr.stable.core.UUID; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLPrintWriter; @@ -52,6 +49,7 @@ import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLTools; import com.fr.stable.xml.XMLWriter; import com.fr.stable.xml.XMLableReader; +import com.fr.third.apache.log4j.FileAppender; import com.fr.third.org.apache.commons.io.FilenameUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContextCallback; @@ -78,8 +76,6 @@ import java.util.ListIterator; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import java.util.logging.FileHandler; -import java.util.logging.Handler; /** * The manager of Designer GUI. @@ -306,14 +302,23 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { calender.setTimeInMillis(System.currentTimeMillis()); String today = calender.get(Calendar.YEAR) + "-" + (calender.get(Calendar.MONTH) + 1) + "-" + calender.get(Calendar.DAY_OF_MONTH); - String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); + final String fileName = StableUtils.pathJoin(logLocation, "fr_" + today + "_%g.log"); if (!new File(fileName).exists()) { StableUtils.makesureFileExist(new File(fileName)); } - Handler handler = new FileHandler(fileName, true); + LogHandler handler = new LogHandler() { + final FileAppender appender = new FileAppender( + new com.fr.third.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"), + fileName + ); + + @Override + public FileAppender getHandler() { + return appender; + } + }; - handler.setFormatter(new FRLogFormatter()); - FineLoggerFactory.getLogger().addLogHandler(handler); + FineLoggerFactory.getLogger().addLogAppender(handler); } catch (SecurityException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { From 0e1151ae8c94153b27fd04dd4feeb84ecba9da08 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Tue, 1 Jun 2021 11:26:19 +0800 Subject: [PATCH 13/17] =?UTF-8?q?REPORT-52987=20=20=20=E4=BF=AE=E5=A4=8Dda?= =?UTF-8?q?taoperator=E7=9A=84=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98;?= =?UTF-8?q?=E9=A1=BA=E5=B8=A6=E4=BF=AE=E5=A4=8D=E5=8F=91=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E5=BC=95=E7=94=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connect/DatabaseConnectionPane.java | 26 +++++++++++++++++-- 1 file changed, 24 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 209f4ab7da..18f4d94405 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 @@ -6,7 +6,7 @@ package com.fr.design.data.datapane.connect; import com.fr.data.impl.Connection; import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; -import com.fr.data.operator.DataOperator; +import com.fr.data.operator.DataOperatorProvider; import com.fr.data.solution.ExceptionSolutionSelector; import com.fr.data.solution.entity.DriverPage; import com.fr.data.solution.processor.ClassNotFoundExceptionSolutionProcessor; @@ -22,9 +22,12 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.log.FineLoggerFactory; +import com.fr.rpc.ExceptionHandler; +import com.fr.rpc.RPCInvokerExceptionInfo; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; +import com.fr.workspace.WorkContext; import javax.swing.BorderFactory; import javax.swing.BoxLayout; @@ -93,7 +96,26 @@ public abstract class DatabaseConnectionPane Date: Wed, 2 Jun 2021 18:33:35 +0800 Subject: [PATCH 14/17] =?UTF-8?q?REPORT-52987=20=20=E4=BF=AE=E5=A4=8Dkerbe?= =?UTF-8?q?ros=E8=AE=A4=E8=AF=81=E4=B8=8B=E6=9A=B4=E9=9C=B2=E7=9A=84throwa?= =?UTF-8?q?ble=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 15/17] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=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 16/17] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=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 17/17] =?UTF-8?q?REPORT-53019=20=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=9B=BD=E9=99=85=E5=8C=96=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=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