1 28 package net.sf.jasperreports.charts.fill; 29 30 import net.sf.jasperreports.charts.JRChartAxis; 31 import net.sf.jasperreports.charts.JRMultiAxisPlot; 32 import net.sf.jasperreports.engine.fill.JRFillChartDataset; 33 import net.sf.jasperreports.engine.fill.JRFillChartPlot; 34 import net.sf.jasperreports.engine.fill.JRFillObjectFactory; 35 36 import java.util.ArrayList ; 37 import java.util.Iterator ; 38 import java.util.List ; 39 40 44 public class JRFillMultiAxisPlot extends JRFillChartPlot implements JRMultiAxisPlot 45 { 46 47 private List axes; 48 49 public JRFillMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRFillObjectFactory factory) 50 { 51 super(multiAxisPlot, factory); 52 53 List parentAxes = multiAxisPlot.getAxes(); 54 this.axes = new ArrayList (parentAxes.size()); 55 Iterator iter = parentAxes.iterator(); 56 while (iter.hasNext()) 57 { 58 JRChartAxis axis = (JRChartAxis)iter.next(); 59 this.axes.add(factory.getChartAxis(axis)); 60 } 61 } 62 63 public List getAxes() 64 { 65 return axes; 66 } 67 68 public JRFillChartDataset getMainDataset() 69 { 70 return (JRFillChartDataset) ((JRFillChartAxis) axes.get(0)).getFillChart().getDataset(); 71 } 72 } 73 | Popular Tags |