From 5c7c4bd888fdaf105ef70af64b056430e7d12bf7 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Fri, 27 Aug 2021 11:00:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-58136=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E6=97=A0=E6=B3=95=E6=96=B0=E5=BB=BA=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/JTemplateNameHelper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java index 4e201a5efa..607c91aef1 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java @@ -53,6 +53,9 @@ public class JTemplateNameHelper { * @Date 2021/4/9 11:13 **/ private static Integer getFileNameIndex(String prefix, String fileName) { + if (fileName.length() <= prefix.length()) { + return null; + } char[] chars = new char[fileName.length()]; int i = 0; for (; i < fileName.length(); i++) { From 787c8e70b1ffaebf4fb59866c5e035d73a55132b Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 8 Sep 2021 16:52:44 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-59077=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E3=80=91=E9=85=8D=E8=89=B2=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=B9=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E6=9C=89=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=EF=BC=8C=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E4=B8=BB=E9=A2=98=E8=A2=AB=E5=88=A0=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 主题配色编辑时需要刷新主题编辑面板以响应配色 变化,刷新是通过populateBean完成的,但同时 该方法会导致保存按钮和名称编辑框的状态被重置。 配色编辑希望更新的实际上只包括扩展色面板以及 下方的自定义编辑面板,如背景/单元格/组件样式 等 【改动思路】 同标题 --- .../mainframe/theme/FormThemeProfilePane.java | 11 ++-------- .../theme/ReportThemeProfilePane.java | 10 ++------- .../theme/TemplateThemeProfilePane.java | 21 +++++++++++-------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java index ef99423bed..f34f8a27f0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java @@ -59,17 +59,10 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane { } @Override - public void populateBean(FormTheme theme) { - super.populateBean(theme); - - isPopulating = true; - + public void populateBean4CustomEditors(FormTheme theme) { + super.populateBean4CustomEditors(theme); formBodyStyleSettingPane.populateBean(theme.getBodyStyle()); componentStyleSettingPane.populateBean(theme.getComponentStyle()); - - themePreviewPane.refresh(theme); - - isPopulating = false; } @Override diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java index 5a1bff3c0f..1158a8eb5d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java @@ -35,15 +35,9 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane extends T theme = updateBean(); FineColorManager.traverse(theme, replaceByColorScheme); - populateBean(theme); - + populateBean4CustomEditors(theme); //图表渐变色 chartStyleSettingPane.populateGradientBar(colors); + + themePreviewPane.refresh(theme); } public void populateBean(T theme) { - try { - this.theme = (T) theme.clone(); - } catch (CloneNotSupportedException e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } + this.theme = theme; isPopulating = true; String name = theme.getName(); @@ -345,14 +342,20 @@ public abstract class TemplateThemeProfilePane extends saveAsButton.setEnabled(!currentIsNewTheme); } - cellStyleSettingPane.populateBean(theme.getCellStyleList()); colorListPane.populate(theme.getColorScheme().getColors()); colorListExtendedPane.populate(colorListPane.update()); - chartStyleSettingPane.populateBean(theme.getChartStyle()); + + populateBean4CustomEditors(theme); + themePreviewPane.refresh(theme); isPopulating = false; } + protected void populateBean4CustomEditors(T theme) { + cellStyleSettingPane.populateBean(theme.getCellStyleList()); + chartStyleSettingPane.populateBean(theme.getChartStyle()); + } + public T updateBean() { if (theme == null) { theme = config.createNewTheme(); From 48d4c2ab9f0116574e24db8be39f7cf625075879 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 9 Sep 2021 09:39:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-58592=20=E6=97=A5=E8=AF=AD=E7=89=88?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=20=E5=BC=95=E7=94=A8css=E5=92=8CJav?= =?UTF-8?q?aScript=E7=9A=84=E9=80=89=E6=8B=A9=E6=96=87=E4=BB=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=87=BA=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/i18n/dimension_en.properties | 3 ++- .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 3 ++- .../resources/com/fr/design/i18n/dimension_ko_KR.properties | 3 ++- .../resources/com/fr/design/i18n/dimension_zh.properties | 3 ++- .../resources/com/fr/design/i18n/dimension_zh_TW.properties | 3 ++- .../src/main/java/com/fr/design/webattr/WebCssPane.java | 3 ++- .../src/main/java/com/fr/design/webattr/WebJsPane.java | 5 +++-- 7 files changed, 15 insertions(+), 8 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 dd33c6a6a4..ef851ffe3f 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 @@ -6,4 +6,5 @@ com.fr.design.report.ReportColumnsPane=800*600 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=490*95 com.fr.design.version.detail.label=750*30 -com.fr.design.version.detail.dialog=900*500 \ No newline at end of file +com.fr.design.version.detail.dialog=900*500 +com.fr.design.web.pane.text.field=450*20 \ No newline at end of file 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 b67a913e7a..379c257449 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 @@ -5,4 +5,5 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=430*95 com.fr.design.version.detail.label=650*30 -com.fr.design.version.detail.dialog=800*500 \ No newline at end of file +com.fr.design.version.detail.dialog=800*500 +com.fr.design.web.pane.text.field=400*20 \ 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 862580eedc..62ee87a7c4 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 @@ -5,4 +5,5 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.design.version.check.dialog=450*95 com.fr.design.version.detail.label=700*30 -com.fr.design.version.detail.dialog=850*500 \ No newline at end of file +com.fr.design.version.detail.dialog=850*500 +com.fr.design.web.pane.text.field=450*20 \ 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 5a325b16bb..fff64947d9 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 @@ -6,4 +6,5 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 com.fr.design.version.detail.label=450*30 -com.fr.design.version.detail.dialog=600*500 \ No newline at end of file +com.fr.design.version.detail.dialog=600*500 +com.fr.design.web.pane.text.field=450*20 \ 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 1be37f9c7a..4b2de3f02c 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 @@ -5,4 +5,5 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.design.version.check.dialog=230*95 com.fr.design.version.detail.label=450*30 -com.fr.design.version.detail.dialog=600*500 \ No newline at end of file +com.fr.design.version.detail.dialog=600*500 +com.fr.design.web.pane.text.field=450*20 \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java index 9ebbf875fe..7dcd3e21b2 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebCssPane.java @@ -5,6 +5,7 @@ import com.fr.design.gui.frpane.EditingStringListPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.widget.FRWidgetFactory; import com.fr.file.FILE; @@ -38,7 +39,7 @@ public class WebCssPane extends BasicPane { JPanel outnorth = new JPanel(new BorderLayout(0, 5)); JPanel northPane = new JPanel(new FlowLayout(FlowLayout.LEFT,8,0)); localText = new UITextField(); - localText.setPreferredSize(new Dimension(450, 20)); + localText.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.web.pane.text.field")); localText.setEditable(false); chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Selection")); chooseFile.setPreferredSize(new Dimension(75, 23)); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java index b2934b10e3..7b371802b6 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WebJsPane.java @@ -7,6 +7,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.DesignSizeI18nManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.widget.FRWidgetFactory; import com.fr.file.FILE; @@ -66,8 +67,8 @@ public class WebJsPane extends BasicPane { localText = new UITextField(); localText.setEditable(false); urlText = new UITextField(); - localText.setPreferredSize(new Dimension(450, 20)); - urlText.setPreferredSize(new Dimension(450, 20)); + localText.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.web.pane.text.field")); + urlText.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.web.pane.text.field")); urlText.addKeyListener(urlTextListener); urlText.setEnabled(false); chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Selection")); From 2bfab3ce67865f948c180fc83367d42d2ca0a80d Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 9 Sep 2021 09:46:24 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-58592=20=E6=97=A5=E8=AF=AD=E7=89=88?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=20=E5=BC=95=E7=94=A8css=E5=92=8CJav?= =?UTF-8?q?aScript=E7=9A=84=E9=80=89=E6=8B=A9=E6=96=87=E4=BB=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=87=BA=E6=9D=A5=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/JTemplateNameHelper.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java index 607c91aef1..4e201a5efa 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplateNameHelper.java @@ -53,9 +53,6 @@ public class JTemplateNameHelper { * @Date 2021/4/9 11:13 **/ private static Integer getFileNameIndex(String prefix, String fileName) { - if (fileName.length() <= prefix.length()) { - return null; - } char[] chars = new char[fileName.length()]; int i = 0; for (; i < fileName.length(); i++) {