From 263fa6df3097c41a08206d2b680d422f1c98e061 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 19 Apr 2023 10:22:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-94199=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E5=9B=BD=E9=99=85=E5=8C=96-=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=84=B1=E6=95=8F=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=9C=AA=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/common/DesensitizationOpenPane.java | 7 +++-- .../fr/design/locale/impl/DataMaskMark.java | 30 +++++++++++++++++++ .../cell/settingpane/CellOtherSetPane.java | 6 +++- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java index 949069aaa8..e04c3fed0e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java @@ -8,10 +8,12 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.locale.impl.DataMaskMark; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.log.FineLoggerFactory; import javax.swing.JPanel; -import java.awt.BorderLayout; import java.awt.Desktop; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -58,7 +60,8 @@ public class DesensitizationOpenPane extends JPanel { @Override public void mouseClicked(MouseEvent event) { try { - URL url = new URL(Toolkit.i18nText("Fine-Design_Report_Desensitization_Help_Document_Url")); + LocaleMark dataMaskMark = LocaleCenter.getMark(DataMaskMark.class); + URL url = new URL(dataMaskMark.getValue()); Desktop.getDesktop().browse(url.toURI()); } catch (Exception e) { FineLoggerFactory.getLogger().error(e, "open browse of table data desensitization help document failed for {}", e.getMessage()); diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java new file mode 100644 index 0000000000..11312657b9 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java @@ -0,0 +1,30 @@ +package com.fr.design.locale.impl; + +import com.fr.design.i18n.LocaleLinkProvider; +import com.fr.general.locale.LocaleMark; + + +/** + * 根据图片信息生成获取国际化服务器图标工具 + * + * @author obo + * @since 11.0 + * Created on 2023/4/19 + */ +public class DataMaskMark implements LocaleMark { + + /** + * 云中心数据脱敏帮助链接链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY = "Fine-Design-CloudCenter_Data_Mask"; + + /** + * 云中心数据脱敏默认帮助链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design_Report_Desensitization_Help_Document_Url"; + + @Override + public String getValue() { + return LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 9879ac53a4..5ac64d401a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -20,6 +20,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.locale.impl.DataMaskMark; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.cell.settingpane.desensitization.CellDesensitizationGroupsPane; @@ -28,6 +29,8 @@ import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellDesensitizationAttr; import com.fr.report.cell.cellattr.CellGUIAttr; @@ -156,10 +159,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane { // 带超链的提示信息 UILabel label = new UILabel(); + LocaleMark dataMaskMark = LocaleCenter.getMark(DataMaskMark.class); MessageWithLink hyperlink = new MessageWithLink( Toolkit.i18nText("Fine-Design_Report_Desensitization_Tip"), Toolkit.i18nText("Fine-Design_Report_Desensitization_Hyperlink"), - Toolkit.i18nText("Fine-Design_Report_Desensitization_Help_Document_Url"), + dataMaskMark.getValue(), StringUtils.EMPTY, label.getBackground(), label.getFont(), From 95af815cb43f19ea5b74326ae0e91389b5e29d46 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 19 Apr 2023 13:59:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-94231=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E5=9B=BD=E9=99=85=E5=8C=96-=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E6=9C=AA=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/locale/impl/LineEngineMark.java | 28 +++++++++++++++++++ .../fr/design/report/ReportEnginePane.java | 8 ++++-- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java new file mode 100644 index 0000000000..a13617af24 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java @@ -0,0 +1,28 @@ +package com.fr.design.locale.impl; + +import com.fr.design.i18n.LocaleLinkProvider; +import com.fr.general.locale.LocaleMark; + +/** + * 根据国际化获取启用行式引擎执行层式报表帮助文档链接 + * + * @author obo + * @since 11.0 + * Created on 2023/4/19 + */ +public class LineEngineMark implements LocaleMark { + + /** + * 云中心数据脱敏帮助链接链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY = "Fine-Design-CloudCenter_Line_Engine"; + + /** + * 云中心数据脱敏默认帮助链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Line_Engine_Default"; + @Override + public String getValue() { + return LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java index 15dd2a3ea3..380809faf0 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java @@ -11,14 +11,15 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.locale.impl.LineEngineMark; import com.fr.design.mainframe.DesignerContext; import com.fr.design.widget.FRWidgetFactory; -import com.fr.general.SiteCenter; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.log.FineLoggerFactory; import com.fr.report.core.ReportUtils; import com.fr.report.stable.LayerReportAttr; import com.fr.report.worksheet.WorkSheet; -import com.fr.stable.ProductConstants; import javax.swing.AbstractButton; import javax.swing.BorderFactory; @@ -203,7 +204,8 @@ public class ReportEnginePane extends BasicBeanPane { @Override public void mouseClicked(MouseEvent e) { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("standard.doc", ProductConstants.WEBSITE_URL))); + LocaleMark lineEngineMark = LocaleCenter.getMark(LineEngineMark.class); + Desktop.getDesktop().browse(new URI(lineEngineMark.getValue())); } catch (IOException | URISyntaxException ex) { FineLoggerFactory.getLogger().error("io exception or not find website", ex); } From d3ac3cca7d80d106a8d45bfe0f151f4244c81a06 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 19 Apr 2023 14:11:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-94231=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E5=9B=BD=E9=99=85=E5=8C=96-=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E8=B6=85=E9=93=BE?= =?UTF-8?q?=E6=9C=AA=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/locale/impl/LineEngineMark.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java index a13617af24..ebb5fd09a3 100644 --- a/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java +++ b/designer-base/src/main/java/com/fr/design/locale/impl/LineEngineMark.java @@ -13,12 +13,12 @@ import com.fr.general.locale.LocaleMark; public class LineEngineMark implements LocaleMark { /** - * 云中心数据脱敏帮助链接链接在配置文件中对应的配置文件key + * 云中心启用行式引擎执行层式报表帮助链接链接在配置文件中对应的配置文件key */ private static final String PROPS_LINK_KEY = "Fine-Design-CloudCenter_Line_Engine"; /** - * 云中心数据脱敏默认帮助链接在配置文件中对应的配置文件key + * 云中心启用行式引擎执行层式报表默认帮助链接在配置文件中对应的配置文件key */ private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Line_Engine_Default"; @Override