1 28 package net.sf.jasperreports.charts.design; 29 30 import net.sf.jasperreports.charts.JRChartAxis; 31 import net.sf.jasperreports.charts.base.JRBaseMultiAxisPlot; 32 import net.sf.jasperreports.engine.JRChartPlot; 33 import net.sf.jasperreports.engine.JRConstants; 34 import net.sf.jasperreports.engine.design.JRDesignChart; 35 36 45 public class JRDesignMultiAxisPlot extends JRBaseMultiAxisPlot 46 { 47 private JRDesignChart chart = null; 48 51 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 52 53 54 59 public JRDesignMultiAxisPlot(JRChartPlot multiAxisPlot) 60 { 61 super(multiAxisPlot); 62 } 63 64 70 public void addAxis(JRChartAxis axis) 71 { 72 axes.add(axis); 73 if (axes.size() == 1) 74 { 75 chart.setDataset(axis.getChart().getDataset()); 76 } 77 } 78 79 82 public void clearAxes() 83 { 84 axes.clear(); 85 chart.setDataset(null); 86 } 87 88 94 public JRDesignChart getChart() 95 { 96 return chart; 97 } 98 99 105 public void setChart(JRDesignChart chart) 106 { 107 this.chart = chart; 108 } 109 } 110 | Popular Tags |