1 28 package net.sf.jasperreports.charts.design; 29 30 import java.util.ArrayList ; 31 import java.util.List ; 32 33 import net.sf.jasperreports.charts.JRXyDataset; 34 import net.sf.jasperreports.charts.JRXySeries; 35 import net.sf.jasperreports.engine.JRChartDataset; 36 import net.sf.jasperreports.engine.JRConstants; 37 import net.sf.jasperreports.engine.JRExpressionCollector; 38 import net.sf.jasperreports.engine.design.JRDesignChartDataset; 39 import net.sf.jasperreports.engine.design.JRVerifier; 40 41 42 43 47 public class JRDesignXyDataset extends JRDesignChartDataset implements JRXyDataset 48 { 49 50 51 54 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 55 56 private List xySeriesList = new ArrayList (); 57 58 59 62 public JRDesignXyDataset(JRChartDataset dataset) 63 { 64 super(dataset); 65 } 66 67 68 71 public JRXySeries[] getSeries() 72 { 73 JRXySeries[] xySeriesArray = new JRXySeries[xySeriesList.size()]; 74 75 xySeriesList.toArray(xySeriesArray); 76 77 return xySeriesArray; 78 } 79 80 81 84 public List getSeriesList() 85 { 86 return xySeriesList; 87 } 88 89 90 93 public void addXySeries(JRXySeries xySeries) 94 { 95 xySeriesList.add(xySeries); 96 } 97 98 99 102 public JRXySeries removeXySeries(JRXySeries xySeries) 103 { 104 if (xySeries != null) 105 { 106 xySeriesList.remove(xySeries); 107 } 108 109 return xySeries; 110 } 111 112 113 116 public byte getDatasetType() { 117 return JRChartDataset.XY_DATASET; 118 } 119 120 121 124 public void collectExpressions(JRExpressionCollector collector) 125 { 126 collector.collect(this); 127 } 128 129 130 public void validate(JRVerifier verifier) 131 { 132 verifier.verify(this); 133 } 134 135 136 } 137 | Popular Tags |