|
|
@ -8,7 +8,6 @@ import com.fr.chartx.data.DataSetDefinition; |
|
|
|
import com.fr.chartx.data.DrillMapChartDataDefinition; |
|
|
|
import com.fr.chartx.data.DrillMapChartDataDefinition; |
|
|
|
import com.fr.chartx.data.MapChartDataDefinition; |
|
|
|
import com.fr.chartx.data.MapChartDataDefinition; |
|
|
|
import com.fr.chartx.data.execute.ExecuteDataSetHelper; |
|
|
|
import com.fr.chartx.data.execute.ExecuteDataSetHelper; |
|
|
|
import com.fr.chartx.data.field.CollectionWithMapAreaAttr; |
|
|
|
|
|
|
|
import com.fr.data.TableDataSource; |
|
|
|
import com.fr.data.TableDataSource; |
|
|
|
import com.fr.data.TableDataSourceTailor; |
|
|
|
import com.fr.data.TableDataSourceTailor; |
|
|
|
import com.fr.data.core.DataCoreUtils; |
|
|
|
import com.fr.data.core.DataCoreUtils; |
|
|
@ -78,13 +77,10 @@ public class MapAreaMatchPane extends BasicBeanPane<VanChart> { |
|
|
|
|
|
|
|
|
|
|
|
private static final Object[] HEADER_WITH_EMPTY = new Object[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Match_To"), ""}; |
|
|
|
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; |
|
|
|
private int level; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MapAreaMatchPane(MapType mapType, int level, TwoTuple<DefaultMutableTreeNode, Set<String>> treeNodeAndItems) { |
|
|
|
public MapAreaMatchPane(int level, TwoTuple<DefaultMutableTreeNode, Set<String>> treeNodeAndItems) { |
|
|
|
this.mapType = mapType; |
|
|
|
|
|
|
|
this.level = level; |
|
|
|
this.level = level; |
|
|
|
|
|
|
|
|
|
|
|
initButtonGroup(); |
|
|
|
initButtonGroup(); |
|
|
@ -209,7 +205,11 @@ public class MapAreaMatchPane extends BasicBeanPane<VanChart> { |
|
|
|
matchResultTable.updateBean(matchResult); |
|
|
|
matchResultTable.updateBean(matchResult); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(VanChart chart) { |
|
|
|
public void populateBean(VanChart vanChart) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void populateBean(VanChart chart, String comboBoxName, MapType mapType) { |
|
|
|
//先取保存的数据集名称和区域名,若不存在,就取数据集面板配置的数据集名称和区域名
|
|
|
|
//先取保存的数据集名称和区域名,若不存在,就取数据集面板配置的数据集名称和区域名
|
|
|
|
MapMatchResult matchResult; |
|
|
|
MapMatchResult matchResult; |
|
|
|
if (level < 0) { |
|
|
|
if (level < 0) { |
|
|
@ -224,7 +224,7 @@ public class MapAreaMatchPane extends BasicBeanPane<VanChart> { |
|
|
|
String tableName = matchResult.getTableName(); |
|
|
|
String tableName = matchResult.getTableName(); |
|
|
|
String areaName = matchResult.getColumnName(); |
|
|
|
String areaName = matchResult.getColumnName(); |
|
|
|
if (tableName == null) { |
|
|
|
if (tableName == null) { |
|
|
|
DataSetDefinition dataSetDefinition = getDataSetDefinition(chart.getChartDataDefinition()); |
|
|
|
DataSetDefinition dataSetDefinition = getDataSetDefinition(chart.getChartDataDefinition(), mapType); |
|
|
|
if (dataSetDefinition == null) { |
|
|
|
if (dataSetDefinition == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -233,9 +233,7 @@ public class MapAreaMatchPane extends BasicBeanPane<VanChart> { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
tableName = nameTableData.getName(); |
|
|
|
tableName = nameTableData.getName(); |
|
|
|
CollectionWithMapAreaAttr columnFieldCollection = (CollectionWithMapAreaAttr) dataSetDefinition.getColumnFieldCollection(); |
|
|
|
areaName = comboBoxName; |
|
|
|
|
|
|
|
|
|
|
|
areaName = columnFieldCollection.getMatchColumn(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
tableNameCombox.setSelectedTableDataByName(tableName); |
|
|
|
tableNameCombox.setSelectedTableDataByName(tableName); |
|
|
|
if (StringUtils.isEmpty(areaName)) { |
|
|
|
if (StringUtils.isEmpty(areaName)) { |
|
|
@ -245,7 +243,7 @@ public class MapAreaMatchPane extends BasicBeanPane<VanChart> { |
|
|
|
populateData(tableName, areaName); |
|
|
|
populateData(tableName, areaName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private DataSetDefinition getDataSetDefinition(ChartDataDefinitionProvider chartDataDefinitionProvider) { |
|
|
|
private DataSetDefinition getDataSetDefinition(ChartDataDefinitionProvider chartDataDefinitionProvider, MapType mapType) { |
|
|
|
DataSetDefinition dataSetDefinition = null; |
|
|
|
DataSetDefinition dataSetDefinition = null; |
|
|
|
if (chartDataDefinitionProvider instanceof MapChartDataDefinition) { |
|
|
|
if (chartDataDefinitionProvider instanceof MapChartDataDefinition) { |
|
|
|
MapChartDataDefinition mapChartDataDefinition = (MapChartDataDefinition) chartDataDefinitionProvider; |
|
|
|
MapChartDataDefinition mapChartDataDefinition = (MapChartDataDefinition) chartDataDefinitionProvider; |
|
|
|