From 263fa6df3097c41a08206d2b680d422f1c98e061 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 19 Apr 2023 10:22:09 +0800 Subject: [PATCH] =?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(),