1 28 package net.sf.jasperreports.renderers; 29 30 import java.awt.Graphics2D ; 31 import java.awt.geom.Rectangle2D ; 32 33 import net.sf.jasperreports.engine.JRAbstractSvgRenderer; 34 import net.sf.jasperreports.engine.JRConstants; 35 36 import org.jfree.chart.JFreeChart; 37 38 39 45 public class JFreeChartRenderer extends JRAbstractSvgRenderer 46 { 47 48 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 49 50 private JFreeChart chart; 51 52 53 58 public JFreeChartRenderer(JFreeChart chart) 59 { 60 this.chart = chart; 61 } 62 63 64 public void render(Graphics2D grx, Rectangle2D rectangle) 65 { 66 if (chart != null) 67 { 68 chart.draw(grx, rectangle); 69 } 70 } 71 72 73 78 public JFreeChart getChart() 79 { 80 return chart; 81 } 82 83 } 84 | Popular Tags |