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.JRXyzDataset; 34 import net.sf.jasperreports.charts.JRXyzSeries; 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 45 public class JRDesignXyzDataset extends JRDesignChartDataset implements JRXyzDataset { 46 47 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 48 49 private List xyzSeriesList = new ArrayList (); 50 51 52 55 public JRDesignXyzDataset(JRChartDataset dataset) 56 { 57 super(dataset); 58 } 59 60 61 64 public JRXyzSeries[] getSeries() 65 { 66 JRXyzSeries[] xyzSeriesArray = new JRXyzSeries[ xyzSeriesList.size() ]; 67 xyzSeriesList.toArray( xyzSeriesArray ); 68 69 return xyzSeriesArray; 70 } 71 72 75 public List getSeriesList() 76 { 77 return xyzSeriesList; 78 } 79 80 83 public void addXyzSeries( JRXyzSeries xyzSeries ) 84 { 85 xyzSeriesList.add( xyzSeries ); 86 } 87 88 91 public JRXyzSeries removeXyzSeries( JRXyzSeries xyzSeries ) 92 { 93 if( xyzSeries != null ){ 94 xyzSeriesList.remove( xyzSeries ); 95 } 96 97 return xyzSeries; 98 } 99 100 103 public byte getDatasetType() { 104 return JRChartDataset.XYZ_DATASET; 105 } 106 107 110 public void collectExpressions(JRExpressionCollector collector) 111 { 112 collector.collect(this); 113 } 114 115 116 public void validate(JRVerifier verifier) 117 { 118 verifier.verify(this); 119 } 120 121 122 } 123 | Popular Tags |