Browse Source

Merge pull request #704 in BA/design from ~ZHENG/design:release to release

* commit '88ef53518ea4568d4d1b53f1f0a09650fa14d956':
  pmd
  单元格数据系列值配置
master
eason 8 years ago
parent
commit
298f6c6dec
  1. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  2. 15
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java
  3. 17
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java

17
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -3,6 +3,8 @@ package com.fr.design.mainframe.chart.gui.data.report;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.chart.chartdata.SeriesDefinition;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
@ -16,6 +18,7 @@ import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import java.awt.*; import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -95,6 +98,20 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartC
return seriesPane.updateBean(); return seriesPane.updateBean();
} }
protected List getEntryList(NormalReportDataDefinition seriesList) {
List list = new ArrayList();
for (int i = 0; i < seriesList.size(); i++) {
SeriesDefinition seriesEntry = (SeriesDefinition) seriesList.get(i);
Object[] nameAndValue = new Object[2];
nameAndValue[0] = seriesEntry.getSeriesName();
nameAndValue[1] = seriesEntry.getValue();
if (nameAndValue[0] != null || nameAndValue[1] != null) {
list.add(nameAndValue);
}
}
return list;
}
/** /**
* 界面标题: * 界面标题:
*/ */

15
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -18,7 +18,6 @@ import javax.swing.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import java.awt.*; import java.awt.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
public class CategoryPlotReportDataContentPane extends AbstractReportDataContentPane { public class CategoryPlotReportDataContentPane extends AbstractReportDataContentPane {
@ -113,20 +112,6 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
filterPane.populateBean(collection); filterPane.populateBean(collection);
} }
private List getEntryList(NormalReportDataDefinition seriesList) {
List list = new ArrayList();
for (int i = 0; i < seriesList.size(); i++) {
SeriesDefinition seriesEntry = (SeriesDefinition) seriesList.get(i);
Object[] nameAndValue = new Object[2];
nameAndValue[0] = seriesEntry.getSeriesName();
nameAndValue[1] = seriesEntry.getValue();
if (nameAndValue[0] != null && nameAndValue[1] != null) {
list.add(nameAndValue);
}
}
return list;
}
public void updateBean(ChartCollection collection) { public void updateBean(ChartCollection collection) {
collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition()); collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition());

17
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/PiePlotReportDataContentPane.java

@ -10,7 +10,6 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -25,7 +24,7 @@ public class PiePlotReportDataContentPane extends AbstractReportDataContentPane
public PiePlotReportDataContentPane(ChartDataPane parent) { public PiePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
this.add(new BoldFontTextLabel(Inter.getLocText("Data_Filter")), "0,4,2,4"); this.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Filter")), "0,4,2,4");
this.add(filterPane = new ChartDataFilterPane(new PiePlot(), parent), "0,6,2,4"); this.add(filterPane = new ChartDataFilterPane(new PiePlot(), parent), "0,6,2,4");
} }
@ -51,20 +50,6 @@ public class PiePlotReportDataContentPane extends AbstractReportDataContentPane
filterPane.populateBean(collection); filterPane.populateBean(collection);
} }
private List getEntryList(NormalReportDataDefinition seriesList) {
List list = new ArrayList();
for(int i = 0; i < seriesList.size(); i++) {
SeriesDefinition seriesEntry = (SeriesDefinition)seriesList.get(i);
Object[] nameAndValue = new Object[2];
nameAndValue[0] = seriesEntry.getSeriesName();
nameAndValue[1] = seriesEntry.getValue();
if(nameAndValue[0] != null && nameAndValue[1] != null) {
list.add(nameAndValue);
}
}
return list;
}
public void updateBean(ChartCollection collection) { public void updateBean(ChartCollection collection) {
collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition()); collection.getSelectedChart().setFilterDefinition(new NormalReportDataDefinition());

Loading…
Cancel
Save