Browse Source

Merge pull request #1346 in DESIGN/design from ~BJORN/design:feature/10.0 to feature/10.0

* commit 'e8fe03bdd68d350cbc19ef65a6d748f3a682ccfd':
  CHART-11899 漏洞修复
  CHART-11899 漏洞修复
research/11.0
Bjorn 5 years ago
parent
commit
cd33f413ba
  1. 22
      designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java
  2. 24
      designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java

22
designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java

@ -1,7 +1,6 @@
package com.fr.van.chart.bubble; package com.fr.van.chart.bubble;
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;
@ -21,7 +20,6 @@ import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContent
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.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane; import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.VanChartOtherPane;
@ -127,24 +125,12 @@ public class BubbleIndependentVanChartInterface extends AbstractIndependentVanCh
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) { return new AbstractVanSingleDataPane(listener) {
VanChartBubblePlot plot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
plot = chart.getPlot();
super.populate(collection);
}
@Override @Override
protected SingleDataPane createSingleDataPane() { protected SingleDataPane createSingleDataPane() {
VanChartBubblePlot plot = null;
if (getVanChart() != null) {
plot = getVanChart().getPlot();
}
if (plot != null && plot.isForceBubble()) { if (plot != null && plot.isForceBubble()) {
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane()); return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
} }

24
designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java

@ -1,6 +1,5 @@
package com.fr.van.chart.gauge; package com.fr.van.chart.gauge;
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;
@ -22,7 +21,6 @@ import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContent
import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane; import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotReportDataContentPane; import com.fr.van.chart.custom.component.MeterCustomPlotReportDataContentPane;
import com.fr.van.chart.custom.component.MeterCustomPlotTableDataContentPane; import com.fr.van.chart.custom.component.MeterCustomPlotTableDataContentPane;
@ -104,6 +102,7 @@ public class GaugeIndependentVanChartInterface extends AbstractIndependentVanCha
/** /**
* 图表的属性界面数组 * 图表的属性界面数组
*
* @return 属性界面 * @return 属性界面
*/ */
public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) { public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) {
@ -119,25 +118,12 @@ public class GaugeIndependentVanChartInterface extends AbstractIndependentVanCha
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) { return new AbstractVanSingleDataPane(listener) {
VanChartGaugePlot gaugePlot;
@Override
public void populate(ChartCollection collection) {
if (collection == null) {
return;
}
VanChart chart = collection.getSelectedChartProvider(VanChart.class);
if (chart == null) {
return;
}
gaugePlot = chart.getPlot();
super.populate(collection);
}
@Override @Override
protected SingleDataPane createSingleDataPane() { protected SingleDataPane createSingleDataPane() {
VanChartGaugePlot gaugePlot = null;
if (getVanChart() != null) {
gaugePlot = getVanChart().getPlot();
}
if (gaugePlot != null && !gaugePlot.isMultiPointer()) { if (gaugePlot != null && !gaugePlot.isMultiPointer()) {
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane()); return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
} }

Loading…
Cancel
Save