From b13925234038d3ca0f692e2bf4871913d62d66c2 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 31 Mar 2023 14:07:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-82787=20=E5=9B=BE=E8=A1=A8=E7=A9=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8F=90=E7=A4=BA=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=9B=BE=E7=89=87=E9=9C=80?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=B9=81=E4=B8=AD=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/locale/impl/EmptyDataMark.java | 37 ------------------ .../module/ChartEmptyDataStylePane.java | 10 ++--- .../{us_emptydata.png => en_us_emptydata.png} | Bin .../{zh_emptydata.png => zh_cn_emptydata.png} | Bin ...onal_emptydata.png => zh_tw_emptydata.png} | Bin 5 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java rename designer-chart/src/main/resources/com/fr/design/images/{us_emptydata.png => en_us_emptydata.png} (100%) rename designer-chart/src/main/resources/com/fr/design/images/{zh_emptydata.png => zh_cn_emptydata.png} (100%) rename designer-chart/src/main/resources/com/fr/design/images/{zh_traditional_emptydata.png => zh_tw_emptydata.png} (100%) diff --git a/designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java b/designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java deleted file mode 100644 index 6b7a2f5fbd..0000000000 --- a/designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.fr.design.locale.impl; - -import com.fr.general.GeneralContext; -import com.fr.general.IOUtils; -import com.fr.general.locale.LocaleMark; - -import java.awt.image.BufferedImage; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -/** - * 根据本地化信息设置服务器图表空数据提示图标 - * - * @author obo - * @version 11.0 - * Created by obo on 2023/3/22 - */ -public class EmptyDataMark implements LocaleMark { - - private Map map = new HashMap<>(); - - private static final BufferedImage ZH_EMPTY_DATA = IOUtils.readImage("com/fr/design/images/zh_emptydata.png"); - private static final BufferedImage US_EMPTY_DATA = IOUtils.readImage("/com/fr/design/images/us_emptydata.png"); - private static final BufferedImage ZH_TRADITIONAL_EMPTY_DATA = IOUtils.readImage("/com/fr/design/images/zh_traditional_emptydata.png"); - - public EmptyDataMark() { - map.put(Locale.CHINA, ZH_EMPTY_DATA); - map.put(Locale.US, US_EMPTY_DATA); - map.put(Locale.TAIWAN, ZH_TRADITIONAL_EMPTY_DATA); - } - @Override - public BufferedImage getValue() { - BufferedImage result = map.get(GeneralContext.getLocale()); - return result == null ? US_EMPTY_DATA : result; - } -} diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java b/designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java index e73bae010e..4f11af9102 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java @@ -10,13 +10,12 @@ import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.locale.impl.EmptyDataMark; import com.fr.design.style.background.image.ImageFileChooser; import com.fr.design.style.background.image.ImagePreviewPane; import com.fr.design.utils.ImageUtils; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.locale.LocaleCenter; -import com.fr.general.locale.LocaleMark; +import com.fr.general.locale.image.LocaleImageFactory; +import com.fr.general.locale.image.LocaleImageMark; import com.fr.stable.Constants; import com.fr.stable.CoreGraphHelper; import com.fr.stable.StringUtils; @@ -63,10 +62,11 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane { private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE; private SwingWorker imageWorker; + private static final String EMPTY_DATA_IMAGE_PATH = "/com/fr/design/images/emptydata.png"; static { - LocaleMark localeMark = LocaleCenter.getMark(EmptyDataMark.class); - DEFAULT_EMPTY_DATA_IMAGE = localeMark.getValue(); + LocaleImageMark localeImageMark = LocaleImageFactory.getOrCreateLocaleMark(EMPTY_DATA_IMAGE_PATH); + DEFAULT_EMPTY_DATA_IMAGE = localeImageMark.getValue(); } @Override diff --git a/designer-chart/src/main/resources/com/fr/design/images/us_emptydata.png b/designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png similarity index 100% rename from designer-chart/src/main/resources/com/fr/design/images/us_emptydata.png rename to designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png diff --git a/designer-chart/src/main/resources/com/fr/design/images/zh_emptydata.png b/designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png similarity index 100% rename from designer-chart/src/main/resources/com/fr/design/images/zh_emptydata.png rename to designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png diff --git a/designer-chart/src/main/resources/com/fr/design/images/zh_traditional_emptydata.png b/designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png similarity index 100% rename from designer-chart/src/main/resources/com/fr/design/images/zh_traditional_emptydata.png rename to designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png From 83acc126ac1cf74a18da03f7e1a3d2b69a580828 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Fri, 21 Apr 2023 14:16:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-94114=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E7=BC=BA=E5=A4=B1=20=E3=80=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=91=E6=B2=A1=E6=9C=89=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=98=AF=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E8=BF=98=E6=98=AF=E6=99=AE=E9=80=9A=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9B=BE=E8=A1=A8=EF=BC=8C=E4=B8=A4=E8=80=85=E7=9A=84?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E9=80=89=E9=A1=B9=E4=B8=8D=E5=90=8C=20?= =?UTF-8?q?=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=E5=BD=93=E5=89=8D=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartHyperLinkPane.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index f80bf08d5a..40fa8f1cfc 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -293,12 +293,19 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { if (template == null) { return false; } - Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; - for (Class aClass : classes) { - if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { - // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 - if (ComparatorUtils.equals(aClass, clazz)) { - return false; + + if (template.isJWorkBook()) { + // 如果是普通报表单元格,那么没有 FormHyperlink 选项 + FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); + return !ComparatorUtils.equals(clazz, formHyperlink.getClass()); + } else { + // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项 + Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; + for (Class aClass : classes) { + if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { + if (ComparatorUtils.equals(aClass, clazz)) { + return false; + } } } } From 10532ad28aa120a5c586995212e7f9786fc7f245 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Fri, 21 Apr 2023 16:34:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-94114=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E7=BC=BA=E5=A4=B1=20=E4=BF=AE=E6=94=B9=20=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E8=B6=85=E9=93=BE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/custom/component/VanChartHyperLinkPane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index 40fa8f1cfc..efd6ec73de 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -299,10 +299,15 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); return !ComparatorUtils.equals(clazz, formHyperlink.getClass()); } else { - // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项 + // 如果是决策报表 + if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { + // 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink选项 + return !ComparatorUtils.equals(clazz, ChartHyperRelateFloatLink.class); + } Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; for (Class aClass : classes) { if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { + // 编辑的是决策报表中的图表,那么没有 ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项 if (ComparatorUtils.equals(aClass, clazz)) { return false; }