|
|
|
@ -1,24 +1,12 @@
|
|
|
|
|
package com.fr.van.chart.vanchart; |
|
|
|
|
|
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
import com.fr.design.chartx.AbstractVanSingleDataPane; |
|
|
|
|
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane; |
|
|
|
|
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane; |
|
|
|
|
import com.fr.design.chartx.single.SingleDataPane; |
|
|
|
|
import com.fr.design.gui.frpane.AttributeChangeListener; |
|
|
|
|
import com.fr.design.mainframe.chart.gui.ChartDataPane; |
|
|
|
|
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; |
|
|
|
|
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.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.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.VanChartMoreCateTableDataContentPane; |
|
|
|
|
|
|
|
|
@ -67,37 +55,38 @@ public abstract class AbstractMultiCategoryVanChartUI extends AbstractIndependen
|
|
|
|
|
// return new AbstractChartAttrPane[]{stylePane, otherPane};
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { |
|
|
|
|
return new AbstractVanSingleDataPane(listener) { |
|
|
|
|
MultiCategoryDataSetFieldsPane multiCategoryDataSetFieldsPane; |
|
|
|
|
MultiCategoryCellDataFieldsPane multiCategoryCellDataFieldsPane; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected SingleDataPane createSingleDataPane() { |
|
|
|
|
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)); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
//图表数据结构 恢复用注释。取消注释。
|
|
|
|
|
// @Override
|
|
|
|
|
// public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
|
|
|
|
|
// return new AbstractVanSingleDataPane(listener) {
|
|
|
|
|
// MultiCategoryDataSetFieldsPane multiCategoryDataSetFieldsPane;
|
|
|
|
|
// MultiCategoryCellDataFieldsPane multiCategoryCellDataFieldsPane;
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// protected SingleDataPane createSingleDataPane() {
|
|
|
|
|
// 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));
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|