KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > chart > renderer > xy > XYItemRenderer


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  * XYItemRenderer.java
29  * -------------------
30  * (C) Copyright 2001-2005, by Object Refinery Limited and Contributors.
31  *
32  * Original Author: David Gilbert (for Object Refinery Limited);
33  * Contributor(s): Mark Watson (www.markwatson.com);
34  * Sylvain Vieujot;
35  * Focus Computer Services Limited;
36  * Richard Atkinson;
37  *
38  * $Id: XYItemRenderer.java,v 1.16.2.2 2005/11/30 13:54:11 mungady Exp $
39  *
40  * Changes
41  * -------
42  * 19-Oct-2001 : Version 1, based on code by Mark Watson (DG);
43  * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG);
44  * 13-Dec-2001 : Changed return type of drawItem from void --> Shape. The area
45  * returned can be used as the tooltip region.
46  * 23-Jan-2002 : Added DrawInfo parameter to drawItem() method (DG);
47  * 28-Mar-2002 : Added a property change listener mechanism. Now renderers do
48  * not have to be immutable (DG);
49  * 04-Apr-2002 : Added the initialise() method (DG);
50  * 09-Apr-2002 : Removed the translated zero from the drawItem method, it can
51  * be calculated inside the initialise method if it is required.
52  * Added a new getToolTipGenerator() method. Changed the return
53  * type for drawItem() to void (DG);
54  * 24-May-2002 : Added ChartRenderingInfo the initialise method API (DG);
55  * 25-Jun-2002 : Removed redundant import (DG);
56  * 20-Aug-2002 : Added get/setURLGenerator methods to interface (DG);
57  * 02-Oct-2002 : Fixed errors reported by Checkstyle (DG);
58  * 18-Nov-2002 : Added methods for drawing grid lines (DG);
59  * 17-Jan-2003 : Moved plot classes into a separate package (DG);
60  * 27-Jan-2003 : Added shape lookup table (DG);
61  * 05-Jun-2003 : Added domain and range grid bands (sponsored by Focus Computer
62  * Services Ltd) (DG);
63  * 27-Jul-2003 : Added getRangeType() to support stacked XY area charts (RA);
64  * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
65  * 25-Feb-2004 : Replaced CrosshairInfo with CrosshairState. Renamed
66  * XYToolTipGenerator --> XYItemLabelGenerator (DG);
67  * 26-Feb-2004 : Added lots of new methods (DG);
68  * 30-Apr-2004 : Added getRangeExtent() method (DG);
69  * 06-May-2004 : Added methods for controlling item label visibility (DG);
70  * 13-May-2004 : Removed property change listener mechanism (DG);
71  * 18-May-2004 : Added item label font and paint methods (DG);
72  * 10-Sep-2004 : Removed redundant getRangeType() method (DG);
73  * 06-Oct-2004 : Replaced getRangeExtent() with findRangeBounds() and added
74  * findDomainBounds (DG);
75  * 23-Nov-2004 : Changed drawRangeGridLine() --> drawRangeLine() (DG);
76  * 07-Jan-2005 : Removed deprecated method (DG);
77  * 24-Feb-2005 : Now extends LegendItemSource (DG);
78  * 20-Apr-2005 : Renamed XYLabelGenerator --> XYItemLabelGenerator (DG);
79  *
80  */

81
82 package org.jfree.chart.renderer.xy;
83
84 import java.awt.Font JavaDoc;
85 import java.awt.Graphics2D JavaDoc;
86 import java.awt.Paint JavaDoc;
87 import java.awt.Shape JavaDoc;
88 import java.awt.Stroke JavaDoc;
89 import java.awt.geom.Rectangle2D JavaDoc;
90
91 import org.jfree.chart.LegendItem;
92 import org.jfree.chart.LegendItemSource;
93 import org.jfree.chart.annotations.XYAnnotation;
94 import org.jfree.chart.axis.ValueAxis;
95 import org.jfree.chart.event.RendererChangeEvent;
96 import org.jfree.chart.event.RendererChangeListener;
97 import org.jfree.chart.labels.ItemLabelPosition;
98 import org.jfree.chart.labels.XYItemLabelGenerator;
99 import org.jfree.chart.labels.XYSeriesLabelGenerator;
100 import org.jfree.chart.labels.XYToolTipGenerator;
101 import org.jfree.chart.plot.CrosshairState;
102 import org.jfree.chart.plot.Marker;
103 import org.jfree.chart.plot.PlotRenderingInfo;
104 import org.jfree.chart.plot.XYPlot;
105 import org.jfree.chart.urls.XYURLGenerator;
106 import org.jfree.data.Range;
107 import org.jfree.data.xy.XYDataset;
108 import org.jfree.ui.Layer;
109
110 /**
111  * Interface for rendering the visual representation of a single (x, y) item on
112  * an {@link XYPlot}.
113  * <p>
114  * To support cloning charts, it is recommended that renderers implement both
115  * the {@link Cloneable} and <code>PublicCloneable</code> interfaces.
116  */

117 public interface XYItemRenderer extends LegendItemSource {
118
119     /**
120      * Initialises the renderer then returns the number of 'passes' through the
121      * data that the renderer will require (usually just one). This method
122      * will be called before the first item is rendered, giving the renderer
123      * an opportunity to initialise any state information it wants to maintain.
124      * The renderer can do nothing if it chooses.
125      *
126      * @param g2 the graphics device.
127      * @param dataArea the area inside the axes.
128      * @param plot the plot.
129      * @param dataset the dataset.
130      * @param info an optional info collection object to return data back to
131      * the caller.
132      *
133      * @return The number of passes the renderer requires.
134      */

135     public XYItemRendererState initialise(Graphics2D JavaDoc g2,
136                                           Rectangle2D JavaDoc dataArea,
137                                           XYPlot plot,
138                                           XYDataset dataset,
139                                           PlotRenderingInfo info);
140
141     /**
142      * Returns the number of passes through the data required by the renderer.
143      *
144      * @return The pass count.
145      */

146     public int getPassCount();
147
148     /**
149      * Returns a boolean that indicates whether or not the specified item
150      * should be drawn (this is typically used to hide an entire series).
151      *
152      * @param series the series index.
153      * @param item the item index.
154      *
155      * @return A boolean.
156      */

157     public boolean getItemVisible(int series, int item);
158     
159     /**
160      * Returns a boolean that indicates whether or not the specified series
161      * should be drawn (this is typically used to hide an entire series).
162      *
163      * @param series the series index.
164      *
165      * @return A boolean.
166      */

167     public boolean isSeriesVisible(int series);
168     
169     /**
170      * Returns the flag that controls the visibility of ALL series. This flag
171      * overrides the per series and default settings - you must set it to
172      * <code>null</code> if you want the other settings to apply.
173      *
174      * @return The flag (possibly <code>null</code>).
175      */

176     public Boolean JavaDoc getSeriesVisible();
177     
178     /**
179      * Sets the flag that controls the visibility of ALL series and sends a
180      * {@link RendererChangeEvent} to all registered listeners. This flag
181      * overrides the per series and default settings - you must set it to
182      * <code>null</code> if you want the other settings to apply.
183      *
184      * @param visible the flag (<code>null</code> permitted).
185      */

186     public void setSeriesVisible(Boolean JavaDoc visible);
187     
188     /**
189      * Sets the flag that controls the visibility of ALL series and sends a
190      * {@link RendererChangeEvent} to all registered listeners. This flag
191      * overrides the per series and default settings - you must set it to
192      * <code>null</code> if you want the other settings to apply.
193      *
194      * @param visible the flag (<code>null</code> permitted).
195      * @param notify notify listeners?
196      */

197     public void setSeriesVisible(Boolean JavaDoc visible, boolean notify);
198     
199     /**
200      * Returns the flag that controls whether a series is visible.
201      *
202      * @param series the series index (zero-based).
203      *
204      * @return The flag (possibly <code>null</code>).
205      */

206     public Boolean JavaDoc getSeriesVisible(int series);
207     
208     /**
209      * Sets the flag that controls whether a series is visible and sends a
210      * {@link RendererChangeEvent} to all registered listeners.
211      *
212      * @param series the series index (zero-based).
213      * @param visible the flag (<code>null</code> permitted).
214      */

215     public void setSeriesVisible(int series, Boolean JavaDoc visible);
216     
217     /**
218      * Sets the flag that controls whether a series is visible and, if
219      * requested, sends a {@link RendererChangeEvent} to all registered
220      * listeners.
221      *
222      * @param series the series index.
223      * @param visible the flag (<code>null</code> permitted).
224      * @param notify notify listeners?
225      */

226     public void setSeriesVisible(int series, Boolean JavaDoc visible, boolean notify);
227
228     /**
229      * Returns the base visibility for all series.
230      *
231      * @return The base visibility.
232      */

233     public boolean getBaseSeriesVisible();
234
235     /**
236      * Sets the base visibility and sends a {@link RendererChangeEvent} to all
237      * registered listeners.
238      *
239      * @param visible the flag.
240      */

241     public void setBaseSeriesVisible(boolean visible);
242     
243     /**
244      * Sets the base visibility and, if requested, sends
245      * a {@link RendererChangeEvent} to all registered listeners.
246      *
247      * @param visible the visibility.
248      * @param notify notify listeners?
249      */

250     public void setBaseSeriesVisible(boolean visible, boolean notify);
251
252     // SERIES VISIBLE IN LEGEND (not yet respected by all renderers)
253

254     /**
255      * Returns <code>true</code> if the series should be shown in the legend,
256      * and <code>false</code> otherwise.
257      *
258      * @param series the series index.
259      *
260      * @return A boolean.
261      */

262     public boolean isSeriesVisibleInLegend(int series);
263     
264     /**
265      * Returns the flag that controls the visibility of ALL series in the
266      * legend. This flag overrides the per series and default settings - you
267      * must set it to <code>null</code> if you want the other settings to
268      * apply.
269      *
270      * @return The flag (possibly <code>null</code>).
271      */

272     public Boolean JavaDoc getSeriesVisibleInLegend();
273     
274     /**
275      * Sets the flag that controls the visibility of ALL series in the legend
276      * and sends a {@link RendererChangeEvent} to all registered listeners.
277      * This flag overrides the per series and default settings - you must set
278      * it to <code>null</code> if you want the other settings to apply.
279      *
280      * @param visible the flag (<code>null</code> permitted).
281      */

282     public void setSeriesVisibleInLegend(Boolean JavaDoc visible);
283     
284     /**
285      * Sets the flag that controls the visibility of ALL series in the legend
286      * and sends a {@link RendererChangeEvent} to all registered listeners.
287      * This flag overrides the per series and default settings - you must set
288      * it to <code>null</code> if you want the other settings to apply.
289      *
290      * @param visible the flag (<code>null</code> permitted).
291      * @param notify notify listeners?
292      */

293     public void setSeriesVisibleInLegend(Boolean JavaDoc visible, boolean notify);
294     
295     /**
296      * Returns the flag that controls whether a series is visible in the
297      * legend. This method returns only the "per series" settings - to
298      * incorporate the override and base settings as well, you need to use the
299      * {@link #isSeriesVisibleInLegend(int)} method.
300      *
301      * @param series the series index (zero-based).
302      *
303      * @return The flag (possibly <code>null</code>).
304      */

305     public Boolean JavaDoc getSeriesVisibleInLegend(int series);
306     
307     /**
308      * Sets the flag that controls whether a series is visible in the legend
309      * and sends a {@link RendererChangeEvent} to all registered listeners.
310      *
311      * @param series the series index (zero-based).
312      * @param visible the flag (<code>null</code> permitted).
313      */

314     public void setSeriesVisibleInLegend(int series, Boolean JavaDoc visible);
315     
316     /**
317      * Sets the flag that controls whether a series is visible in the legend
318      * and, if requested, sends a {@link RendererChangeEvent} to all registered
319      * listeners.
320      *
321      * @param series the series index.
322      * @param visible the flag (<code>null</code> permitted).
323      * @param notify notify listeners?
324      */

325     public void setSeriesVisibleInLegend(int series, Boolean JavaDoc visible,
326                                          boolean notify);
327
328     /**
329      * Returns the base visibility in the legend for all series.
330      *
331      * @return The base visibility.
332      */

333     public boolean getBaseSeriesVisibleInLegend();
334
335     /**
336      * Sets the base visibility in the legend and sends a
337      * {@link RendererChangeEvent} to all registered listeners.
338      *
339      * @param visible the flag.
340      */

341     public void setBaseSeriesVisibleInLegend(boolean visible);
342     
343     /**
344      * Sets the base visibility in the legend and, if requested, sends
345      * a {@link RendererChangeEvent} to all registered listeners.
346      *
347      * @param visible the visibility.
348      * @param notify notify listeners?
349      */

350     public void setBaseSeriesVisibleInLegend(boolean visible, boolean notify);
351
352     // PAINT
353

354     /**
355      * Returns the paint used to fill data items as they are drawn.
356      *
357      * @param row the row (or series) index (zero-based).
358      * @param column the column (or category) index (zero-based).
359      *
360      * @return The paint (never <code>null</code>).
361      */

362     public Paint JavaDoc getItemPaint(int row, int column);
363
364     /**
365      * Returns the paint used to fill an item drawn by the renderer.
366      *
367      * @param series the series index (zero-based).
368      *
369      * @return The paint (never <code>null</code>).
370      */

371     public Paint JavaDoc getSeriesPaint(int series);
372
373     /**
374      * Sets the paint to be used for ALL series, and sends a
375      * {@link RendererChangeEvent} to all registered listeners. If this is
376      * <code>null</code>, the renderer will use the paint for the series.
377      *
378      * @param paint the paint (<code>null</code> permitted).
379      */

380     public void setPaint(Paint JavaDoc paint);
381     
382     /**
383      * Sets the paint used for a series and sends a {@link RendererChangeEvent}
384      * to all registered listeners.
385      *
386      * @param series the series index (zero-based).
387      * @param paint the paint (<code>null</code> permitted).
388      */

389     public void setSeriesPaint(int series, Paint JavaDoc paint);
390     
391     /**
392      * Returns the base paint.
393      *
394      * @return The base paint (never <code>null</code>).
395      */

396     public Paint JavaDoc getBasePaint();
397
398     /**
399      * Sets the base paint and sends a {@link RendererChangeEvent} to all
400      * registered listeners.
401      *
402      * @param paint the paint (<code>null</code> not permitted).
403      */

404     public void setBasePaint(Paint JavaDoc paint);
405     
406     // OUTLINE PAINT
407

408     /**
409      * Returns the paint used to outline data items as they are drawn.
410      *
411      * @param row the row (or series) index (zero-based).
412      * @param column the column (or category) index (zero-based).
413      *
414      * @return The paint (never <code>null</code>).
415      */

416     public Paint JavaDoc getItemOutlinePaint(int row, int column);
417
418     /**
419      * Returns the paint used to outline an item drawn by the renderer.
420      *
421      * @param series the series (zero-based index).
422      *
423      * @return The paint (never <code>null</code>).
424      */

425     public Paint JavaDoc getSeriesOutlinePaint(int series);
426
427     /**
428      * Sets the paint used for a series outline and sends a
429      * {@link RendererChangeEvent} to all registered listeners.
430      *
431      * @param series the series index (zero-based).
432      * @param paint the paint (<code>null</code> permitted).
433      */

434     public void setSeriesOutlinePaint(int series, Paint JavaDoc paint);
435
436     /**
437      * Sets the outline paint for ALL series (optional).
438      *
439      * @param paint the paint (<code>null</code> permitted).
440      */

441     public void setOutlinePaint(Paint JavaDoc paint);
442     
443     /**
444      * Returns the base outline paint.
445      *
446      * @return The paint (never <code>null</code>).
447      */

448     public Paint JavaDoc getBaseOutlinePaint();
449
450     /**
451      * Sets the base outline paint and sends a {@link RendererChangeEvent} to
452      * all registered listeners.
453      *
454      * @param paint the paint (<code>null</code> not permitted).
455      */

456     public void setBaseOutlinePaint(Paint JavaDoc paint);
457
458     // STROKE
459

460     /**
461      * Returns the stroke used to draw data items.
462      *
463      * @param row the row (or series) index (zero-based).
464      * @param column the column (or category) index (zero-based).
465      *
466      * @return The stroke (never <code>null</code>).
467      */

468     public Stroke JavaDoc getItemStroke(int row, int column);
469
470     /**
471      * Returns the stroke used to draw the items in a series.
472      *
473      * @param series the series (zero-based index).
474      *
475      * @return The stroke (never <code>null</code>).
476      */

477     public Stroke JavaDoc getSeriesStroke(int series);
478     
479     /**
480      * Sets the stroke for ALL series and sends a {@link RendererChangeEvent}
481      * to all registered listeners.
482      *
483      * @param stroke the stroke (<code>null</code> permitted).
484      */

485     public void setStroke(Stroke JavaDoc stroke);
486
487     /**
488      * Sets the stroke used for a series and sends a
489      * {@link RendererChangeEvent} to all registered listeners.
490      *
491      * @param series the series index (zero-based).
492      * @param stroke the stroke (<code>null</code> permitted).
493      */

494     public void setSeriesStroke(int series, Stroke JavaDoc stroke);
495
496     /**
497      * Returns the base stroke.
498      *
499      * @return The base stroke (never <code>null</code>).
500      */

501     public Stroke JavaDoc getBaseStroke();
502
503     /**
504      * Sets the base stroke.
505      *
506      * @param stroke the stroke (<code>null</code> not permitted).
507      */

508     public void setBaseStroke(Stroke JavaDoc stroke);
509     
510     // OUTLINE STROKE
511

512     /**
513      * Returns the stroke used to outline data items. The default
514      * implementation passes control to the getSeriesOutlineStroke method.
515      * You can override this method if you require different behaviour.
516      *
517      * @param row the row (or series) index (zero-based).
518      * @param column the column (or category) index (zero-based).
519      *
520      * @return The stroke (never <code>null</code>).
521      */

522     public Stroke JavaDoc getItemOutlineStroke(int row, int column);
523
524     /**
525      * Returns the stroke used to outline the items in a series.
526      *
527      * @param series the series (zero-based index).
528      *
529      * @return The stroke (never <code>null</code>).
530      */

531     public Stroke JavaDoc getSeriesOutlineStroke(int series);
532
533     /**
534      * Sets the outline stroke for ALL series and sends a
535      * {@link RendererChangeEvent} to all registered listeners.
536      *
537      * @param stroke the stroke (<code>null</code> permitted).
538      */

539     public void setOutlineStroke(Stroke JavaDoc stroke);
540     
541     /**
542      * Sets the outline stroke used for a series and sends a
543      * {@link RendererChangeEvent} to all registered listeners.
544      *
545      * @param series the series index (zero-based).
546      * @param stroke the stroke (<code>null</code> permitted).
547      */

548     public void setSeriesOutlineStroke(int series, Stroke JavaDoc stroke);
549     
550     /**
551      * Returns the base outline stroke.
552      *
553      * @return The stroke (never <code>null</code>).
554      */

555     public Stroke JavaDoc getBaseOutlineStroke();
556
557     /**
558      * Sets the base outline stroke and sends a {@link RendererChangeEvent} to
559      * all registered listeners.
560      *
561      * @param stroke the stroke (<code>null</code> not permitted).
562      */

563     public void setBaseOutlineStroke(Stroke JavaDoc stroke);
564     
565     // SHAPE
566

567     /**
568      * Returns a shape used to represent a data item.
569      *
570      * @param row the row (or series) index (zero-based).
571      * @param column the column (or category) index (zero-based).
572      *
573      * @return The shape (never <code>null</code>).
574      */

575     public Shape JavaDoc getItemShape(int row, int column);
576
577     /**
578      * Returns a shape used to represent the items in a series.
579      *
580      * @param series the series (zero-based index).
581      *
582      * @return The shape (never <code>null</code>).
583      */

584     public Shape JavaDoc getSeriesShape(int series);
585     /**
586      * Sets the shape for ALL series (optional) and sends a
587      * {@link RendererChangeEvent} to all registered listeners.
588      *
589      * @param shape the shape (<code>null</code> permitted).
590      */

591     public void setShape(Shape JavaDoc shape);
592     
593     /**
594      * Sets the shape used for a series and sends a {@link RendererChangeEvent}
595      * to all registered listeners.
596      *
597      * @param series the series index (zero-based).
598      * @param shape the shape (<code>null</code> permitted).
599      */

600     public void setSeriesShape(int series, Shape JavaDoc shape);
601     
602     /**
603      * Returns the base shape.
604      *
605      * @return The shape (never <code>null</code>).
606      */

607     public Shape JavaDoc getBaseShape();
608
609     /**
610      * Sets the base shape and sends a {@link RendererChangeEvent} to all
611      * registered listeners.
612      *
613      * @param shape the shape (<code>null</code> not permitted).
614      */

615     public void setBaseShape(Shape JavaDoc shape);
616     
617     // ITEM LABELS VISIBLE
618

619     /**
620      * Returns <code>true</code> if an item label is visible, and
621      * <code>false</code> otherwise.
622      *
623      * @param row the row index (zero-based).
624      * @param column the column index (zero-based).
625      *
626      * @return A boolean.
627      */

628     public boolean isItemLabelVisible(int row, int column);
629     
630     /**
631      * Returns <code>true</code> if the item labels for a series are visible,
632      * and <code>false</code> otherwise.
633      *
634      * @param series the series index (zero-based).
635      *
636      * @return A boolean.
637      */

638     public boolean isSeriesItemLabelsVisible(int series);
639     
640     /**
641      * Sets a flag that controls whether or not the item labels for ALL series
642      * are visible.
643      *
644      * @param visible the flag.
645      */

646     public void setItemLabelsVisible(boolean visible);
647
648     /**
649      * Sets a flag that controls whether or not the item labels for ALL series
650      * are visible.
651      *
652      * @param visible the flag (<code>null</code> permitted).
653      */

654     public void setItemLabelsVisible(Boolean JavaDoc visible);
655
656     /**
657      * Sets the visibility of item labels for ALL series and, if requested,
658      * sends a {@link RendererChangeEvent} to all registered listeners.
659      *
660      * @param visible a flag that controls whether or not the item labels are
661      * visible (<code>null</code> permitted).
662      * @param notify a flag that controls whether or not listeners are
663      * notified.
664      */

665     public void setItemLabelsVisible(Boolean JavaDoc visible, boolean notify);
666
667     /**
668      * Sets a flag that controls the visibility of the item labels for a series.
669      *
670      * @param series the series index (zero-based).
671      * @param visible the flag.
672      */

673     public void setSeriesItemLabelsVisible(int series, boolean visible);
674     
675     /**
676      * Sets a flag that controls the visibility of the item labels for a series.
677      *
678      * @param series the series index (zero-based).
679      * @param visible the flag (<code>null</code> permitted).
680      */

681     public void setSeriesItemLabelsVisible(int series, Boolean JavaDoc visible);
682     
683     /**
684      * Sets the visibility of item labels for a series and, if requested,
685      * sends a {@link RendererChangeEvent} to all registered listeners.
686      *
687      * @param series the series index (zero-based).
688      * @param visible the visible flag.
689      * @param notify a flag that controls whether or not listeners are
690      * notified.
691      */

692     public void setSeriesItemLabelsVisible(int series, Boolean JavaDoc visible,
693                                            boolean notify);
694     
695     /**
696      * Returns the base setting for item label visibility.
697      *
698      * @return A flag (possibly <code>null</code>).
699      */

700     public Boolean JavaDoc getBaseItemLabelsVisible();
701     
702     /**
703      * Sets the base flag that controls whether or not item labels are visible.
704      *
705      * @param visible the flag.
706      */

707     public void setBaseItemLabelsVisible(boolean visible);
708     
709     /**
710      * Sets the base setting for item label visibility.
711      *
712      * @param visible the flag (<code>null</code> permitted).
713      */

714     public void setBaseItemLabelsVisible(Boolean JavaDoc visible);
715     
716     /**
717      * Sets the base visibility for item labels and, if requested, sends a
718      * {@link RendererChangeEvent} to all registered listeners.
719      *
720      * @param visible the visibility flag.
721      * @param notify a flag that controls whether or not listeners are
722      * notified.
723      */

724     public void setBaseItemLabelsVisible(Boolean JavaDoc visible, boolean notify);
725
726     // ITEM LABEL GENERATOR
727

728     /**
729      * Returns the item label generator for a data item.
730      *
731      * @param row the row index (zero based).
732      * @param column the column index (zero based).
733      *
734      * @return The generator (possibly <code>null</code>).
735      */

736     public XYItemLabelGenerator getItemLabelGenerator(int row, int column);
737     
738     /**
739      * Returns the item label generator for a series.
740      *
741      * @param series the series index (zero based).
742      *
743      * @return The generator (possibly <code>null</code>).
744      */

745     public XYItemLabelGenerator getSeriesItemLabelGenerator(int series);
746
747     /**
748      * Sets the item label generator for ALL series and sends a
749      * {@link RendererChangeEvent} to all registered listeners.
750      *
751      * @param generator the generator (<code>null</code> permitted).
752      */

753     public void setItemLabelGenerator(XYItemLabelGenerator generator);
754
755     /**
756      * Sets the item label generator for a series and sends a
757      * {@link RendererChangeEvent} to all registered listeners.
758      *
759      * @param series the series index (zero based).
760      * @param generator the generator (<code>null</code> permitted).
761      */

762     public void setSeriesItemLabelGenerator(int series,
763                                             XYItemLabelGenerator generator);
764
765     /**
766      * Returns the base item label generator.
767      *
768      * @return The generator (possibly <code>null</code>).
769      */

770     public XYItemLabelGenerator getBaseItemLabelGenerator();
771
772     /**
773      * Sets the base item label generator and sends a
774      * {@link RendererChangeEvent} to all registered listeners.
775      *
776      * @param generator the generator (<code>null</code> permitted).
777      */

778     public void setBaseItemLabelGenerator(XYItemLabelGenerator generator);
779
780     // TOOL TIP GENERATOR
781

782     /**
783      * Returns the tool tip generator for a data item.
784      *
785      * @param row the row index (zero based).
786      * @param column the column index (zero based).
787      *
788      * @return The generator (possibly <code>null</code>).
789      */

790     public XYToolTipGenerator getToolTipGenerator(int row, int column);
791     
792     /**
793      * Returns the tool tip generator for a series.
794      *
795      * @param series the series index (zero based).
796      *
797      * @return The generator (possibly <code>null</code>).
798      */

799     public XYToolTipGenerator getSeriesToolTipGenerator(int series);
800
801     /**
802      * Sets the tool tip generator for ALL series and sends a
803      * {@link RendererChangeEvent} to all registered listeners.
804      *
805      * @param generator the generator (<code>null</code> permitted).
806      */

807     public void setToolTipGenerator(XYToolTipGenerator generator);
808
809     /**
810      * Sets the tool tip generator for a series and sends a
811      * {@link RendererChangeEvent} to all registered listeners.
812      *
813      * @param series the series index (zero based).
814      * @param generator the generator (<code>null</code> permitted).
815      */

816     public void setSeriesToolTipGenerator(int series,
817                                           XYToolTipGenerator generator);
818
819     /**
820      * Returns the base tool tip generator.
821      *
822      * @return The generator (possibly <code>null</code>).
823      */

824     public XYToolTipGenerator getBaseToolTipGenerator();
825
826     /**
827      * Sets the base tool tip generator and sends a {@link RendererChangeEvent}
828      * to all registered listeners.
829      *
830      * @param generator the generator (<code>null</code> permitted).
831      */

832     public void setBaseToolTipGenerator(XYToolTipGenerator generator);
833
834     // URL GENERATOR
835

836     /**
837      * Returns the URL generator for HTML image maps.
838      *
839      * @return The URL generator (possibly null).
840      */

841     public XYURLGenerator getURLGenerator();
842
843     /**
844      * Sets the URL generator for HTML image maps.
845      *
846      * @param urlGenerator the URL generator (null permitted).
847      */

848     public void setURLGenerator(XYURLGenerator urlGenerator);
849
850     //// ITEM LABEL FONT ///////////////////////////////////////////////////////
851

852     /**
853      * Returns the font for an item label.
854      *
855      * @param row the row index (zero-based).
856      * @param column the column index (zero-based).
857      *
858      * @return The font (never <code>null</code>).
859      */

860     public Font JavaDoc getItemLabelFont(int row, int column);
861
862     /**
863      * Returns the font used for all item labels. This may be
864      * <code>null</code>, in which case the per series font settings will apply.
865      *
866      * @return The font (possibly <code>null</code>).
867      */

868     public Font JavaDoc getItemLabelFont();
869     
870     /**
871      * Sets the item label font for ALL series and sends a
872      * {@link RendererChangeEvent} to all registered listeners. You can set
873      * this to <code>null</code> if you prefer to set the font on a per series
874      * basis.
875      *
876      * @param font the font (<code>null</code> permitted).
877      */

878     public void setItemLabelFont(Font JavaDoc font);
879     
880     /**
881      * Returns the font for all the item labels in a series.
882      *
883      * @param series the series index (zero-based).
884      *
885      * @return The font (possibly <code>null</code>).
886      */

887     public Font JavaDoc getSeriesItemLabelFont(int series);
888
889     /**
890      * Sets the item label font for a series and sends a
891      * {@link RendererChangeEvent} to all registered listeners.
892      *
893      * @param series the series index (zero-based).
894      * @param font the font (<code>null</code> permitted).
895      */

896     public void setSeriesItemLabelFont(int series, Font JavaDoc font);
897
898     /**
899      * Returns the base item label font (this is used when no other font
900      * setting is available).
901      *
902      * @return The font (<code>never</code> null).
903      */

904     public Font JavaDoc getBaseItemLabelFont();
905
906     /**
907      * Sets the base item label font and sends a {@link RendererChangeEvent}
908      * to all registered listeners.
909      *
910      * @param font the font (<code>null</code> not permitted).
911      */

912     public void setBaseItemLabelFont(Font JavaDoc font);
913
914     //// ITEM LABEL PAINT /////////////////////////////////////////////////////
915

916     /**
917      * Returns the paint used to draw an item label.
918      *
919      * @param row the row index (zero based).
920      * @param column the column index (zero based).
921      *
922      * @return The paint (never <code>null</code>).
923      */

924     public Paint JavaDoc getItemLabelPaint(int row, int column);
925     
926     /**
927      * Returns the paint used for all item labels. This may be
928      * <code>null</code>, in which case the per series paint settings will
929      * apply.
930      *
931      * @return The paint (possibly <code>null</code>).
932      */

933     public Paint JavaDoc getItemLabelPaint();
934
935     /**
936      * Sets the item label paint for ALL series and sends a
937      * {@link RendererChangeEvent} to all registered listeners.
938      *
939      * @param paint the paint (<code>null</code> permitted).
940      */

941     public void setItemLabelPaint(Paint JavaDoc paint);
942     
943     /**
944      * Returns the paint used to draw the item labels for a series.
945      *
946      * @param series the series index (zero based).
947      *
948      * @return The paint (possibly <code>null<code>).
949      */

950     public Paint JavaDoc getSeriesItemLabelPaint(int series);
951
952     /**
953      * Sets the item label paint for a series and sends a
954      * {@link RendererChangeEvent} to all registered listeners.
955      *
956      * @param series the series (zero based index).
957      * @param paint the paint (<code>null</code> permitted).
958      */

959     public void setSeriesItemLabelPaint(int series, Paint JavaDoc paint);
960         
961     /**
962      * Returns the base item label paint.
963      *
964      * @return The paint (never <code>null<code>).
965      */

966     public Paint JavaDoc getBaseItemLabelPaint();
967
968     /**
969      * Sets the base item label paint and sends a {@link RendererChangeEvent}
970      * to all registered listeners.
971      *
972      * @param paint the paint (<code>null</code> not permitted).
973      */

974     public void setBaseItemLabelPaint(Paint JavaDoc paint);
975     
976     // POSITIVE ITEM LABEL POSITION...
977

978     /**
979      * Returns the item label position for positive values.
980      *
981      * @param row the row index (zero-based).
982      * @param column the column index (zero-based).
983      *
984      * @return The item label position (never <code>null</code>).
985      */

986     public ItemLabelPosition getPositiveItemLabelPosition(int row, int column);
987
988     /**
989      * Returns the item label position for positive values in ALL series.
990      *
991      * @return The item label position (possibly <code>null</code>).
992      */

993     public ItemLabelPosition getPositiveItemLabelPosition();
994
995     /**
996      * Sets the item label position for positive values in ALL series, and
997      * sends a {@link RendererChangeEvent} to all registered listeners. You
998      * need to set this to <code>null</code> to expose the settings for
999      * individual series.
1000     *
1001     * @param position the position (<code>null</code> permitted).
1002     */

1003    public v