01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.ubt.report.view.chart;
06:
07: /**
08: *
09: */
10: import java.awt.Graphics2D;
11: import java.awt.geom.Rectangle2D;
12:
13: import org.jfree.ui.Drawable;
14:
15: import net.sf.jasperreports.engine.JRAbstractSvgRenderer;
16:
17: /**
18: * A wrapper for the Drawable interface in the JCommon library: you will need the
19: * JCommon classes in your classpath to compile this class. In particular this can be
20: * used to allow JFreeChart objects to be included in the output report in vector form.
21: */
22: public class UBTChartRenderer extends JRAbstractSvgRenderer {
23:
24: /**
25: *
26: */
27: private Drawable drawable = null;
28:
29: /**
30: *
31: */
32: public UBTChartRenderer(Drawable drawable) {
33: this .drawable = drawable;
34: }
35:
36: /**
37: *
38: */
39: public void render(Graphics2D grx, Rectangle2D rectangle) {
40: if (drawable != null) {
41: drawable.draw(grx, rectangle);
42: }
43: }
44:
45: }
|