|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fr.van.chart.vanchart; |
|
|
|
package com.fr.van.chart.vanchart; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
import com.fr.chart.chartattr.Chart; |
|
|
|
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.chartx.AbstractVanSingleDataPane; |
|
|
|
import com.fr.design.chartx.AbstractVanSingleDataPane; |
|
|
@ -14,7 +15,13 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa |
|
|
|
import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; |
|
|
|
import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; |
|
|
|
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
|
|
|
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; |
|
|
|
import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; |
|
|
|
import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; |
|
|
|
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartPlot; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.column.VanChartColumnPlot; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.type.AxisType; |
|
|
|
|
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
import com.fr.van.chart.designer.data.VanChartMoreCateReportDataContentPane; |
|
|
|
import com.fr.van.chart.designer.data.VanChartMoreCateReportDataContentPane; |
|
|
|
import com.fr.van.chart.designer.data.VanChartMoreCateTableDataContentPane; |
|
|
|
import com.fr.van.chart.designer.data.VanChartMoreCateTableDataContentPane; |
|
|
|
import com.fr.van.chart.designer.other.VanChartInteractivePane; |
|
|
|
import com.fr.van.chart.designer.other.VanChartInteractivePane; |
|
|
@ -68,9 +75,33 @@ public abstract class AbstractMultiCategoryVanChartUI extends AbstractIndependen |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { |
|
|
|
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { |
|
|
|
return new AbstractVanSingleDataPane(listener) { |
|
|
|
return new AbstractVanSingleDataPane(listener) { |
|
|
|
|
|
|
|
MultiCategoryDataSetFieldsPane multiCategoryDataSetFieldsPane; |
|
|
|
|
|
|
|
MultiCategoryCellDataFieldsPane multiCategoryCellDataFieldsPane; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected SingleDataPane createSingleDataPane() { |
|
|
|
protected SingleDataPane createSingleDataPane() { |
|
|
|
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane()); |
|
|
|
multiCategoryDataSetFieldsPane = new MultiCategoryDataSetFieldsPane(); |
|
|
|
|
|
|
|
multiCategoryCellDataFieldsPane = new MultiCategoryCellDataFieldsPane(); |
|
|
|
|
|
|
|
return new SingleDataPane(multiCategoryDataSetFieldsPane, multiCategoryCellDataFieldsPane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void populate(ChartCollection collection) { |
|
|
|
|
|
|
|
super.populate(collection); |
|
|
|
|
|
|
|
VanChart vanChart = this.getVanChart(); |
|
|
|
|
|
|
|
if (vanChart == null) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VanChartRectanglePlot plot = vanChart.getPlot(); |
|
|
|
|
|
|
|
VanChartAxis axis = plot.getDefaultXAxis(); |
|
|
|
|
|
|
|
if (plot instanceof VanChartColumnPlot |
|
|
|
|
|
|
|
&& ((VanChartColumnPlot) plot).isBar()) { |
|
|
|
|
|
|
|
axis = plot.getDefaultYAxis(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
multiCategoryDataSetFieldsPane.setCategoryAxis(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_CATEGORY)); |
|
|
|
|
|
|
|
multiCategoryCellDataFieldsPane.setCategoryAxis(ComparatorUtils.equals(axis.getAxisType(), AxisType.AXIS_CATEGORY)); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|