From e4ddae1b6d2e75c3ba3f83ee36795b168c5cdaae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 31 Dec 2019 14:51:26 +0800 Subject: [PATCH] =?UTF-8?q?CHART-11090=20=E5=9C=B0=E5=9B=BE=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chartx/component/MapAreaMatchPane.java | 20 +++++++++---------- .../fields/diff/MapDataSetFieldsPane.java | 8 ++++---- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java index fcf737991..981a190a4 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/MapAreaMatchPane.java @@ -8,7 +8,6 @@ import com.fr.chartx.data.DataSetDefinition; import com.fr.chartx.data.DrillMapChartDataDefinition; import com.fr.chartx.data.MapChartDataDefinition; import com.fr.chartx.data.execute.ExecuteDataSetHelper; -import com.fr.chartx.data.field.CollectionWithMapAreaAttr; import com.fr.data.TableDataSource; import com.fr.data.TableDataSourceTailor; import com.fr.data.core.DataCoreUtils; @@ -78,13 +77,10 @@ public class MapAreaMatchPane extends BasicBeanPane { private static final Object[] HEADER_WITH_EMPTY = new Object[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Match_To"), ""}; - private MapType mapType; - private int level; - public MapAreaMatchPane(MapType mapType, int level, TwoTuple> treeNodeAndItems) { - this.mapType = mapType; + public MapAreaMatchPane(int level, TwoTuple> treeNodeAndItems) { this.level = level; initButtonGroup(); @@ -209,7 +205,11 @@ public class MapAreaMatchPane extends BasicBeanPane { matchResultTable.updateBean(matchResult); } - public void populateBean(VanChart chart) { + public void populateBean(VanChart vanChart) { + + } + + public void populateBean(VanChart chart, String comboBoxName, MapType mapType) { //先取保存的数据集名称和区域名,若不存在,就取数据集面板配置的数据集名称和区域名 MapMatchResult matchResult; if (level < 0) { @@ -224,7 +224,7 @@ public class MapAreaMatchPane extends BasicBeanPane { String tableName = matchResult.getTableName(); String areaName = matchResult.getColumnName(); if (tableName == null) { - DataSetDefinition dataSetDefinition = getDataSetDefinition(chart.getChartDataDefinition()); + DataSetDefinition dataSetDefinition = getDataSetDefinition(chart.getChartDataDefinition(), mapType); if (dataSetDefinition == null) { return; } @@ -233,9 +233,7 @@ public class MapAreaMatchPane extends BasicBeanPane { return; } tableName = nameTableData.getName(); - CollectionWithMapAreaAttr columnFieldCollection = (CollectionWithMapAreaAttr) dataSetDefinition.getColumnFieldCollection(); - - areaName = columnFieldCollection.getMatchColumn(); + areaName = comboBoxName; } tableNameCombox.setSelectedTableDataByName(tableName); if (StringUtils.isEmpty(areaName)) { @@ -245,7 +243,7 @@ public class MapAreaMatchPane extends BasicBeanPane { populateData(tableName, areaName); } - private DataSetDefinition getDataSetDefinition(ChartDataDefinitionProvider chartDataDefinitionProvider) { + private DataSetDefinition getDataSetDefinition(ChartDataDefinitionProvider chartDataDefinitionProvider, MapType mapType) { DataSetDefinition dataSetDefinition = null; if (chartDataDefinitionProvider instanceof MapChartDataDefinition) { MapChartDataDefinition mapChartDataDefinition = (MapChartDataDefinition) chartDataDefinitionProvider; diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java index df7938e07..01a963ea0 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java @@ -1,9 +1,9 @@ package com.fr.design.chartx.fields.diff; import com.fr.base.BaseUtils; +import com.fr.base.Utils; import com.fr.chartx.TwoTuple; import com.fr.chartx.data.field.diff.ColumnFieldCollectionWithSeriesValue; -import com.fr.design.beans.BasicBeanPane; import com.fr.design.chartx.component.MapAreaMatchPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionListener; @@ -51,7 +51,7 @@ public abstract class MapDataSetFieldsPane