|
|
|
@ -1,9 +1,20 @@
|
|
|
|
|
package com.fr.van.chart.designer.style; |
|
|
|
|
|
|
|
|
|
import com.fr.base.TableData; |
|
|
|
|
import com.fr.base.chart.chartdata.TopDefinitionProvider; |
|
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
import com.fr.chart.chartdata.MoreNameCDDefinition; |
|
|
|
|
import com.fr.chart.chartdata.OneValueCDDefinition; |
|
|
|
|
import com.fr.data.TableDataSource; |
|
|
|
|
import com.fr.data.impl.EmbeddedTableData; |
|
|
|
|
import com.fr.design.DesignModelAdapter; |
|
|
|
|
import com.fr.design.data.DesignTableDataManager; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
|
import com.fr.design.mainframe.chart.gui.ChartStylePane; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; |
|
|
|
|
import com.fr.van.chart.designer.style.axis.VanChartAxisPane; |
|
|
|
|
import com.fr.van.chart.designer.style.background.VanChartAreaPane; |
|
|
|
@ -75,4 +86,47 @@ public class VanChartStylePane extends ChartStylePane {
|
|
|
|
|
protected void addVanChartTooltipPane(List<BasicPane> paneList) { |
|
|
|
|
paneList.add(new VanChartTooltipPane(VanChartStylePane.this)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<String> getDataModelColumnNames() { |
|
|
|
|
Chart chart = getChart(); |
|
|
|
|
|
|
|
|
|
if (chart == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TopDefinitionProvider definition = chart.getFilterDefinition(); |
|
|
|
|
|
|
|
|
|
if (definition == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DesignModelAdapter adapter = DesignModelAdapter.getCurrentModelAdapter(); |
|
|
|
|
TableDataSource tableDataSource = adapter == null ? null : adapter.getBook(); |
|
|
|
|
|
|
|
|
|
TableData tableData = null; |
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(definition.getDataDefinitionType(), OneValueCDDefinition.DEFINITION_TYPE)) { |
|
|
|
|
OneValueCDDefinition oneValueCDDefinition = (OneValueCDDefinition) definition; |
|
|
|
|
tableData = oneValueCDDefinition.getTableData(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(definition.getDataDefinitionType(), MoreNameCDDefinition.DEFINITION_TYPE)) { |
|
|
|
|
MoreNameCDDefinition moreNameCDDefinition = (MoreNameCDDefinition) definition; |
|
|
|
|
tableData = moreNameCDDefinition.getTableData(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (tableData == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
EmbeddedTableData embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tableDataSource, |
|
|
|
|
tableData, TableData.RESULT_NOT_NEED, false); |
|
|
|
|
|
|
|
|
|
return DesignTableDataManager.getColumnNamesByTableData(embeddedTableData); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |