From c65877b26f71e8bffe4c76064301391baa02494f Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 10:49:08 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-104017=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84GIS?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E4=BC=98=E5=8C=96-fvs=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2gis=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BC=9A=E7=94=B1mapbox=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/map/designer/type/GisLayerPane.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 253e5dcf19..3a078d4e29 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -358,10 +358,22 @@ public class GisLayerPane extends JPanel implements UIObserver { * @param layer 图层 */ private void adaptEditingTemplateTheme(GisLayer layer) { + if (Locale.CHINA.equals(GeneralContext.getLocale())) { + return; + } JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + String defaultTabOperator = "DefaultTabOperator"; //用于判断是否为fvs,fvs没有主题,但会返回深色主题导致mapbox切换为black + if(JTemplate.isValid(currentEditingTemplate)) { boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); - String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); + String name; + String mapbox = Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); + String black = Toolkit.i18nText("Fine-Design_Chart_Layer_Black"); + if(defaultTabOperator.equals(currentEditingTemplate.getTemplateTabOperatorType())) { + name = dark ? black : mapbox; + } else { + name = mapbox; + } layer.setLayerName(name); } } From 3109cda04d14f5ce066f3e5587d359d7f4f915ae Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 13:56:50 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-104017=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84GIS?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E4=BC=98=E5=8C=96-fvs=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2gis=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BC=9A=E7=94=B1mapbox=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/map/designer/type/GisLayerPane.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 3a078d4e29..d7bc40e33e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -62,6 +62,11 @@ public class GisLayerPane extends JPanel implements UIObserver { private String[] layers = MapLayerConfigManager.getCustomLayerItems(); + /** + * fvs的具体类型 + */ + private String FVS_TEMPLATE_CLASS = "class com.fr.plugin.wysiwyg.report.JDuchamp"; + public GisLayerPane() { initComps(); } @@ -250,9 +255,9 @@ public class GisLayerPane extends JPanel implements UIObserver { public void resetGisLayer(VanChartMapPlot mapPlot) { // if (ChartEditContext.supportTheme()) { - GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); - mapPlot.setGisLayer(defaultGisLayer); - populate(defaultGisLayer); + GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); + mapPlot.setGisLayer(defaultGisLayer); + populate(defaultGisLayer); // } else { // GaoDeGisType gaoDeGisType = mapPlot.getDefaultGisLayerType(); // @@ -291,7 +296,7 @@ public class GisLayerPane extends JPanel implements UIObserver { if (layer.getGisLayerType() == GISLayerType.LAYER_NULL) { standardLayers.setSelectedIndex(standardLayers.getItemCount() - 1); } else { - if(Locale.CHINA.equals(GeneralContext.getLocale())) { + if (Locale.CHINA.equals(GeneralContext.getLocale())) { standardLayers.setSelectedItem(layerName); layer.setGaoDeGisType(GaoDeGisType.parseByLocaleName(layerName)); } else { @@ -358,22 +363,16 @@ public class GisLayerPane extends JPanel implements UIObserver { * @param layer 图层 */ private void adaptEditingTemplateTheme(GisLayer layer) { - if (Locale.CHINA.equals(GeneralContext.getLocale())) { + if (GeneralContext.isSimpleChineseEnv()) { return; } JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - String defaultTabOperator = "DefaultTabOperator"; //用于判断是否为fvs,fvs没有主题,但会返回深色主题导致mapbox切换为black - - if(JTemplate.isValid(currentEditingTemplate)) { - boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); - String name; - String mapbox = Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); - String black = Toolkit.i18nText("Fine-Design_Chart_Layer_Black"); - if(defaultTabOperator.equals(currentEditingTemplate.getTemplateTabOperatorType())) { - name = dark ? black : mapbox; - } else { - name = mapbox; + if (JTemplate.isValid(currentEditingTemplate)) { + if (FVS_TEMPLATE_CLASS.equals(currentEditingTemplate.getClass().toString())) { + return; } + boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); + String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); layer.setLayerName(name); } } From 6eb5934a997c1955aecbd4ea877b6aa87abcc6e6 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 14:00:30 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-104017=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84GIS?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E4=BC=98=E5=8C=96-fvs=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2gis=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BC=9A=E7=94=B1mapbox=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/van/chart/map/designer/type/GisLayerPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index d7bc40e33e..868a41fd4f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -65,7 +65,7 @@ public class GisLayerPane extends JPanel implements UIObserver { /** * fvs的具体类型 */ - private String FVS_TEMPLATE_CLASS = "class com.fr.plugin.wysiwyg.report.JDuchamp"; + private static final String FVS_TEMPLATE_CLASS = "class com.fr.plugin.wysiwyg.report.JDuchamp"; public GisLayerPane() { initComps(); From 5675d210ed8f4ebc85e65caa10652726a4da9932 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 14:05:29 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-104017=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E7=BB=84=E4=BB=B6=E7=9A=84GIS?= =?UTF-8?q?=E5=9B=BE=E5=B1=82=E4=BC=98=E5=8C=96-fvs=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2gis=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BC=9A=E7=94=B1mapbox=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/van/chart/map/designer/type/GisLayerPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 868a41fd4f..faef723a4e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -65,7 +65,7 @@ public class GisLayerPane extends JPanel implements UIObserver { /** * fvs的具体类型 */ - private static final String FVS_TEMPLATE_CLASS = "class com.fr.plugin.wysiwyg.report.JDuchamp"; + private static final String FVS_TEMPLATE_CLASS = "com.fr.plugin.wysiwyg.report.JDuchamp"; public GisLayerPane() { initComps(); @@ -368,7 +368,7 @@ public class GisLayerPane extends JPanel implements UIObserver { } JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); if (JTemplate.isValid(currentEditingTemplate)) { - if (FVS_TEMPLATE_CLASS.equals(currentEditingTemplate.getClass().toString())) { + if (FVS_TEMPLATE_CLASS.equals(currentEditingTemplate.getClass().getName())) { return; } boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); From 34a49a231f6eb38baf27a08046af3979fcd4a5e0 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 25 Aug 2023 14:25:51 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-104017=20=E5=88=A0=E9=99=A4=E6=B2=A1?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/map/designer/type/GisLayerPane.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index faef723a4e..5681d9c1f0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -253,19 +253,9 @@ public class GisLayerPane extends JPanel implements UIObserver { } public void resetGisLayer(VanChartMapPlot mapPlot) { - -// if (ChartEditContext.supportTheme()) { GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); mapPlot.setGisLayer(defaultGisLayer); populate(defaultGisLayer); -// } else { -// GaoDeGisType gaoDeGisType = mapPlot.getDefaultGisLayerType(); -// -// mapPlot.getGisLayer().setGisLayerType(GISLayerType.GAO_DE_API); -// mapPlot.getGisLayer().setLayerName(gaoDeGisType.getTypeName()); -// mapPlot.getGisLayer().setGaoDeGisType(gaoDeGisType); -// populate(mapPlot.getGisLayer()); -// } } public void populate(GisLayer layer) { @@ -274,7 +264,6 @@ public class GisLayerPane extends JPanel implements UIObserver { gisButton.setSelectedIndex(0); layer.setGisLayerType(GISLayerType.AUTO); layer.setLayerName(GISLayerType.getLocString(GISLayerType.AUTO)); - //dealWithTemplateTheme(layer); break; case GAO_DE_API: populateStandardGis(layer); From bb1b959606655528d4481ef35945f3d43c3ad530 Mon Sep 17 00:00:00 2001 From: obo Date: Tue, 29 Aug 2023 14:17:50 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-104017=20=E4=B8=8D=E4=B8=93=E9=97=A8?= =?UTF-8?q?=E9=80=82=E9=85=8Dfvs=E4=BA=86=EF=BC=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=A0=B9=E6=8D=AE=E6=A8=A1=E7=89=88=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E9=80=82=E9=85=8D=E5=9B=BE=E5=B1=82=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=8F=AF=E4=BB=A5=E5=85=BC=E5=AE=B9fvs=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=EF=BC=8Cfvs=E5=88=9B=E5=BB=BA=E5=9B=BE=E5=B1=82?= =?UTF-8?q?=E6=97=B6=E5=A4=84=E7=90=86=E4=B8=80=E4=B8=8B=E4=B8=BAblack?= =?UTF-8?q?=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/map/designer/type/GisLayerPane.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 5681d9c1f0..37f178e196 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -62,11 +62,6 @@ public class GisLayerPane extends JPanel implements UIObserver { private String[] layers = MapLayerConfigManager.getCustomLayerItems(); - /** - * fvs的具体类型 - */ - private static final String FVS_TEMPLATE_CLASS = "com.fr.plugin.wysiwyg.report.JDuchamp"; - public GisLayerPane() { initComps(); } @@ -352,14 +347,11 @@ public class GisLayerPane extends JPanel implements UIObserver { * @param layer 图层 */ private void adaptEditingTemplateTheme(GisLayer layer) { - if (GeneralContext.isSimpleChineseEnv()) { + if (Locale.CHINA.equals(GeneralContext.getLocale())) { return; } JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); if (JTemplate.isValid(currentEditingTemplate)) { - if (FVS_TEMPLATE_CLASS.equals(currentEditingTemplate.getClass().getName())) { - return; - } boolean dark = currentEditingTemplate.getTemplateTheme().isDark(); String name = dark ? Toolkit.i18nText("Fine-Design_Chart_Layer_Black") : Toolkit.i18nText("Fine-Design_Chart_Layer_MapBox"); layer.setLayerName(name);