KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > chart > renderer > PolarItemRenderer


1 /* ===========================================================
2  * JFreeChart : a free chart library for the Java(tm) platform
3  * ===========================================================
4  *
5  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jfreechart/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * ----------------------
28  * PolarItemRenderer.java
29  * ----------------------
30  * (C) Copyright 2004, by Solution Engineering, Inc. and Contributors.
31  *
32  * Original Author: Daniel Bridenbecker, Solution Engineering, Inc.;
33  * Contributor(s): David Gilbert (for Object Refinery Limited);
34  *
35  * $Id: PolarItemRenderer.java,v 1.3.2.2 2005/10/25 20:53:40 mungady Exp $
36  *
37  * Changes
38  * -------
39  * 19-Jan-2004 : Version 1, contributed by DB with minor changes by DG (DG);
40  *
41  */

42
43 package org.jfree.chart.renderer;
44
45 import java.awt.Graphics2D JavaDoc;
46 import java.awt.geom.Rectangle2D JavaDoc;
47 import java.util.List JavaDoc;
48
49 import org.jfree.chart.LegendItem;
50 import org.jfree.chart.axis.ValueAxis;
51 import org.jfree.chart.event.RendererChangeListener;
52 import org.jfree.chart.plot.PlotRenderingInfo;
53 import org.jfree.chart.plot.PolarPlot;
54 import org.jfree.data.xy.XYDataset;
55
56 /**
57  * The interface for a renderer that can be used by the {@link PolarPlot} class.
58  */

59 public interface PolarItemRenderer {
60     
61     /**
62      * Plots the data for a given series.
63      *
64      * @param g2 the drawing surface.
65      * @param dataArea the data area.
66      * @param info collects plot rendering info.
67      * @param plot the plot.
68      * @param dataset the dataset.
69      * @param seriesIndex the series index.
70      */

71     public void drawSeries(Graphics2D JavaDoc g2,
72                            Rectangle2D JavaDoc dataArea,
73                            PlotRenderingInfo info,
74                            PolarPlot plot,
75                            XYDataset dataset,
76                            int seriesIndex);
77     
78     /**
79      * Draw the angular gridlines - the spokes.
80      *
81      * @param g2 the drawing surface.
82      * @param plot the plot.
83      * @param ticks the ticks.
84      * @param dataArea the data area.
85      */

86     public void drawAngularGridLines(Graphics2D JavaDoc g2,
87                                      PolarPlot plot,
88                                      List JavaDoc ticks,
89                                      Rectangle2D JavaDoc dataArea);
90     
91     /**
92      * Draw the radial gridlines - the rings.
93      *
94      * @param g2 the drawing surface.
95      * @param plot the plot.
96      * @param radialAxis the radial axis.
97      * @param ticks the ticks.
98      * @param dataArea the data area.
99      */

100     public void drawRadialGridLines(Graphics2D JavaDoc g2,
101                                     PolarPlot plot,
102                                     ValueAxis radialAxis,
103                                     List JavaDoc ticks,
104                                     Rectangle2D JavaDoc dataArea);
105
106     /**
107      * Return the legend for the given series.
108      *
109      * @param series the series index.
110      *
111      * @return The legend item.
112      */

113     public LegendItem getLegendItem(int series);
114
115     /**
116      * Returns the plot that this renderer has been assigned to.
117      *
118      * @return The plot.
119      */

120     public PolarPlot getPlot();
121
122     /**
123      * Sets the plot that this renderer is assigned to.
124      * <P>
125      * This method will be called by the plot class...you do not need to call
126      * it yourself.
127      *
128      * @param plot the plot.
129      */

130     public void setPlot(PolarPlot plot);
131
132     /**
133      * Adds a change listener.
134      *
135      * @param listener the listener.
136      */

137     public void addChangeListener(RendererChangeListener listener);
138     
139     /**
140      * Removes a change listener.
141      *
142      * @param listener the listener.
143      */

144     public void removeChangeListener(RendererChangeListener listener);
145     
146     
147 }
148
Popular Tags