1 28 package net.sf.jasperreports.charts.base; 29 30 import net.sf.jasperreports.charts.JRChartAxis; 31 import net.sf.jasperreports.charts.JRMultiAxisPlot; 32 import net.sf.jasperreports.engine.JRChartPlot; 33 import net.sf.jasperreports.engine.JRConstants; 34 import net.sf.jasperreports.engine.JRExpressionCollector; 35 import net.sf.jasperreports.engine.base.JRBaseChartPlot; 36 import net.sf.jasperreports.engine.base.JRBaseObjectFactory; 37 38 import java.util.Iterator ; 39 import java.util.List ; 40 41 47 public class JRBaseMultiAxisPlot extends JRBaseChartPlot implements JRMultiAxisPlot 48 { 49 50 51 54 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 55 56 62 protected List axes = new java.util.ArrayList (); 63 64 65 66 71 public JRBaseMultiAxisPlot(JRChartPlot multiAxisPlot) 72 { 73 super(multiAxisPlot); 74 } 75 76 85 public JRBaseMultiAxisPlot(JRMultiAxisPlot multiAxisPlot, JRBaseObjectFactory factory) 86 { 87 super(multiAxisPlot, factory); 88 89 List origAxes = multiAxisPlot.getAxes(); 90 axes.clear(); 91 if (origAxes != null) 92 { 93 Iterator iter = origAxes.iterator(); 94 while (iter.hasNext()) 95 { 96 JRChartAxis axis = (JRChartAxis)iter.next(); 97 axes.add(factory.getChartAxis(axis)); 98 } 99 } 100 } 101 102 103 104 107 public List getAxes() 108 { 109 return axes; 110 } 111 112 119 public void collectExpressions(JRExpressionCollector collector) 120 { 121 Iterator iter = axes.iterator(); 122 while (iter.hasNext()) 123 { 124 JRChartAxis axis = (JRChartAxis)iter.next(); 125 collector.collect(axis.getChart()); 126 } 127 } 128 } 129 | Popular Tags |