KickJava   Java API By Example, From Geeks To Geeks.

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


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 License
20  * along with this library; if not, write to the Free Software Foundation,
21  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
24  * in the United States and other countries.]
25  *
26  * ---------------------
27  * AbstractRenderer.java
28  * ---------------------
29  * (C) Copyright 2002-2005, by Object Refinery Limited.
30  *
31  * Original Author: David Gilbert (for Object Refinery Limited);
32  * Contributor(s): Nicolas Brodu;
33  *
34  * $Id: AbstractRenderer.java,v 1.22 2005/06/01 09:35:54 mungady Exp $
35  *
36  * Changes:
37  * --------
38  * 22-Aug-2002 : Version 1, draws code out of AbstractXYItemRenderer to share
39  * with AbstractCategoryItemRenderer (DG);
40  * 01-Oct-2002 : Fixed errors reported by Checkstyle (DG);
41  * 06-Nov-2002 : Moved to the com.jrefinery.chart.renderer package (DG);
42  * 21-Nov-2002 : Added a paint table for the renderer to use (DG);
43  * 17-Jan-2003 : Moved plot classes into a separate package (DG);
44  * 25-Mar-2003 : Implemented Serializable (DG);
45  * 29-Apr-2003 : Added valueLabelFont and valueLabelPaint attributes, based on
46  * code from Arnaud Lelievre (DG);
47  * 29-Jul-2003 : Amended code that doesn't compile with JDK 1.2.2 (DG);
48  * 13-Aug-2003 : Implemented Cloneable (DG);
49  * 15-Sep-2003 : Fixed serialization (NB);
50  * 17-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
51  * 07-Oct-2003 : Moved PlotRenderingInfo into RendererState to allow for
52  * multiple threads using a single renderer (DG);
53  * 20-Oct-2003 : Added missing setOutlinePaint() method (DG);
54  * 23-Oct-2003 : Split item label attributes into 'positive' and 'negative'
55  * values (DG);
56  * 26-Nov-2003 : Added methods to get the positive and negative item label
57  * positions (DG);
58  * 01-Mar-2004 : Modified readObject() method to prevent null pointer exceptions
59  * after deserialization (DG);
60  * 19-Jul-2004 : Fixed bug in getItemLabelFont(int, int) method (DG);
61  * 04-Oct-2004 : Updated equals() method, eliminated use of NumberUtils,
62  * renamed BooleanUtils --> BooleanUtilities, ShapeUtils -->
63  * ShapeUtilities (DG);
64  * 15-Mar-2005 : Fixed serialization of baseFillPaint (DG);
65  * 16-May-2005 : Base outline stroke should never be null (DG);
66  * 01-Jun-2005 : Added hasListener() method for unit testing (DG);
67  *
68  */

69
70 package org.jfree.chart.renderer;
71
72 import java.awt.BasicStroke JavaDoc;
73 import java.awt.Color JavaDoc;
74 import java.awt.Font JavaDoc;
75 import java.awt.Paint JavaDoc;
76 import java.awt.Shape JavaDoc;
77 import java.awt.Stroke JavaDoc;
78 import java.awt.geom.Point2D JavaDoc;
79 import java.awt.geom.Rectangle2D JavaDoc;
80 import java.io.IOException JavaDoc;
81 import java.io.ObjectInputStream JavaDoc;
82 import java.io.ObjectOutputStream JavaDoc;
83 import java.io.Serializable JavaDoc;
84 import java.util.Arrays JavaDoc;
85 import java.util.EventListener JavaDoc;
86 import java.util.List JavaDoc;
87
88 import javax.swing.event.EventListenerList JavaDoc;
89
90 import org.jfree.chart.event.RendererChangeEvent;
91 import org.jfree.chart.event.RendererChangeListener;
92 import org.jfree.chart.labels.ItemLabelAnchor;
93 import org.jfree.chart.labels.ItemLabelPosition;
94 import org.jfree.chart.plot.DrawingSupplier;
95 import org.jfree.chart.plot.PlotOrientation;
96 import org.jfree.io.SerialUtilities;
97 import org.jfree.ui.TextAnchor;
98 import org.jfree.util.BooleanList;
99 import org.jfree.util.BooleanUtilities;
100 import org.jfree.util.ObjectList;
101 import org.jfree.util.ObjectUtilities;
102 import org.jfree.util.PaintList;
103 import org.jfree.util.ShapeList;
104 import org.jfree.util.ShapeUtilities;
105 import org.jfree.util.StrokeList;
106
107 /**
108  * Base class providing common services for renderers. Most methods that update
109  * attributes of the renderer will fire a {@link RendererChangeEvent}, which
110  * normally means the plot that owns the renderer will receive notification that
111  * the renderer has been changed (the plot will, in turn, notify the chart).
112  */

113 public abstract class AbstractRenderer implements Cloneable JavaDoc, Serializable JavaDoc {
114
115     /** For serialization. */
116     private static final long serialVersionUID = -828267569428206075L;
117     
118     /** A useful constant. */
119     public static final Double JavaDoc ZERO = new Double JavaDoc(0.0);
120     
121     /** The default paint. */
122     public static final Paint JavaDoc DEFAULT_PAINT = Color.blue;
123
124     /** The default outline paint. */
125     public static final Paint JavaDoc DEFAULT_OUTLINE_PAINT = Color.gray;
126
127     /** The default stroke. */
128     public static final Stroke JavaDoc DEFAULT_STROKE = new BasicStroke JavaDoc(1.0f);
129
130     /** The default outline stroke. */
131     public static final Stroke JavaDoc DEFAULT_OUTLINE_STROKE = new BasicStroke JavaDoc(1.0f);
132
133     /** The default shape. */
134     public static final Shape JavaDoc DEFAULT_SHAPE
135         = new Rectangle2D.Double JavaDoc(-3.0, -3.0, 6.0, 6.0);
136
137     /** The default value label font. */
138     public static final Font JavaDoc DEFAULT_VALUE_LABEL_FONT
139         = new Font JavaDoc("SansSerif", Font.PLAIN, 10);
140
141     /** The default value label paint. */
142     public static final Paint JavaDoc DEFAULT_VALUE_LABEL_PAINT = Color.black;
143
144     /** A flag that controls the visibility of ALL series. */
145     private Boolean JavaDoc seriesVisible;
146     
147     /** A list of flags that controls whether or not each series is visible. */
148     private BooleanList seriesVisibleList;
149
150     /** The default visibility for each series. */
151     private boolean baseSeriesVisible;
152     
153     /** A flag that controls the visibility of ALL series in the legend. */
154     private Boolean JavaDoc seriesVisibleInLegend;
155     
156     /**
157      * A list of flags that controls whether or not each series is visible in
158      * the legend.
159      */

160     private BooleanList seriesVisibleInLegendList;
161
162     /** The default visibility for each series in the legend. */
163     private boolean baseSeriesVisibleInLegend;
164         
165     /** The paint for ALL series (optional). */
166     private transient Paint JavaDoc paint;
167
168     /** The paint list. */
169     private PaintList paintList;
170
171     /** The base paint. */
172     private transient Paint JavaDoc basePaint;
173
174     /** The fill paint for ALL series (optional). */
175     private transient Paint JavaDoc fillPaint;
176
177     /** The fill paint list. */
178     private PaintList fillPaintList;
179
180     /** The base fill paint. */
181     private transient Paint JavaDoc baseFillPaint;
182
183     /** The outline paint for ALL series (optional). */
184     private transient Paint JavaDoc outlinePaint;
185
186     /** The outline paint list. */
187     private PaintList outlinePaintList;
188
189     /** The base outline paint. */
190     private transient Paint JavaDoc baseOutlinePaint;
191
192     /** The stroke for ALL series (optional). */
193     private transient Stroke JavaDoc stroke;
194
195     /** The stroke list. */
196     private StrokeList strokeList;
197
198     /** The base stroke. */
199     private transient Stroke JavaDoc baseStroke;
200
201     /** The outline stroke for ALL series (optional). */
202     private transient Stroke JavaDoc outlineStroke;
203
204     /** The outline stroke list. */
205     private StrokeList outlineStrokeList;
206
207     /** The base outline stroke. */
208     private transient Stroke JavaDoc baseOutlineStroke;
209
210     /** The shape for ALL series (optional). */
211     private transient Shape JavaDoc shape;
212
213     /** A shape list. */
214     private ShapeList shapeList;
215
216     /** The base shape. */
217     private transient Shape JavaDoc baseShape;
218
219     /** Visibility of the item labels for ALL series (optional). */
220     private Boolean JavaDoc itemLabelsVisible;
221
222     /** Visibility of the item labels PER series. */
223     private BooleanList itemLabelsVisibleList;
224
225     /** The base item labels visible. */
226     private Boolean JavaDoc baseItemLabelsVisible;
227
228     /** The item label font for ALL series (optional). */
229     private Font JavaDoc itemLabelFont;
230
231     /** The item label font list (one font per series). */
232     private ObjectList itemLabelFontList;
233
234     /** The base item label font. */
235     private Font JavaDoc baseItemLabelFont;
236
237     /** The item label paint for ALL series. */
238     private transient Paint JavaDoc itemLabelPaint;
239
240     /** The item label paint list (one paint per series). */
241     private PaintList itemLabelPaintList;
242
243     /** The base item label paint. */
244     private transient Paint JavaDoc baseItemLabelPaint;
245
246     /** The positive item label position for ALL series (optional). */
247     private ItemLabelPosition positiveItemLabelPosition;
248     
249     /** The positive item label position (per series). */
250     private ObjectList positiveItemLabelPositionList;
251     
252     /** The fallback positive item label position. */
253     private ItemLabelPosition basePositiveItemLabelPosition;
254     
255     /** The negative item label position for ALL series (optional). */
256     private ItemLabelPosition negativeItemLabelPosition;
257     
258     /** The negative item label position (per series). */
259     private ObjectList negativeItemLabelPositionList;
260     
261     /** The fallback negative item label position. */
262     private ItemLabelPosition baseNegativeItemLabelPosition;
263
264     /** The item label anchor offset. */
265     private double itemLabelAnchorOffset = 2.0;
266
267     /**
268      * A flag that controls whether or not entities are generated for
269      * ALL series (optional).
270      */

271     private Boolean JavaDoc createEntities;
272
273     /**
274      * Flags that control whether or not entities are generated for each
275      * series. This will be overridden by 'createEntities'.
276      */

277     private BooleanList createEntitiesList;
278
279     /**
280      * The default flag that controls whether or not entities are generated.
281      * This flag is used when both the above flags return null.
282      */

283     private boolean baseCreateEntities;
284     
285     /** Storage for registered change listeners. */
286     private transient EventListenerList JavaDoc listenerList;
287
288     /**
289      * Default constructor.
290      */

291     public AbstractRenderer() {
292
293         this.seriesVisible = null;
294         this.seriesVisibleList = new BooleanList();
295         this.baseSeriesVisible = true;
296         
297         this.seriesVisibleInLegend = null;
298         this.seriesVisibleInLegendList = new BooleanList();
299         this.baseSeriesVisibleInLegend = true;
300
301         this.paint = null;
302         this.paintList = new PaintList();
303         this.basePaint = DEFAULT_PAINT;
304
305         this.fillPaint = null;
306         this.fillPaintList = new PaintList();
307         this.baseFillPaint = Color.white;
308
309         this.outlinePaint = null;
310         this.outlinePaintList = new PaintList();
311         this.baseOutlinePaint = DEFAULT_OUTLINE_PAINT;
312
313         this.stroke = null;
314         this.strokeList = new StrokeList();
315         this.baseStroke = DEFAULT_STROKE;
316
317         this.outlineStroke = null;
318         this.outlineStrokeList = new StrokeList();
319         this.baseOutlineStroke = DEFAULT_OUTLINE_STROKE;
320
321         this.shape = null;
322         this.shapeList = new ShapeList();
323         this.baseShape = DEFAULT_SHAPE;
324
325         this.itemLabelsVisible = null;
326         this.itemLabelsVisibleList = new BooleanList();
327         this.baseItemLabelsVisible = Boolean.FALSE;
328
329         this.itemLabelFont = null;
330         this.itemLabelFontList = new ObjectList();
331         this.baseItemLabelFont = new Font JavaDoc("SansSerif", Font.PLAIN, 10);
332
333         this.itemLabelPaint = null;
334         this.itemLabelPaintList = new PaintList();
335         this.baseItemLabelPaint = Color.black;
336
337         this.positiveItemLabelPosition = null;
338         this.positiveItemLabelPositionList = new ObjectList();
339         this.basePositiveItemLabelPosition = new ItemLabelPosition(
340             ItemLabelAnchor.OUTSIDE12, TextAnchor.BOTTOM_CENTER
341         );
342         
343         this.negativeItemLabelPosition = null;
344         this.negativeItemLabelPositionList = new ObjectList();
345         this.baseNegativeItemLabelPosition = new ItemLabelPosition(
346             ItemLabelAnchor.OUTSIDE6, TextAnchor.TOP_CENTER
347         );
348
349         this.createEntities = null;
350         this.createEntitiesList = new BooleanList();
351         this.baseCreateEntities = true;
352         
353         this.listenerList = new EventListenerList JavaDoc();
354
355     }
356
357     /**
358      * Returns the drawing supplier from the plot.
359      *
360      * @return The drawing supplier.
361      */

362     public abstract DrawingSupplier getDrawingSupplier();
363     
364     // SERIES VISIBLE (not yet respected by all renderers)
365

366     /**
367      * Returns a boolean that indicates whether or not the specified item
368      * should be drawn (this is typically used to hide an entire series).
369      *
370      * @param series the series index.
371      * @param item the item index.
372      *
373      * @return A boolean.
374      */

375     public boolean getItemVisible(int series, int item) {
376         return isSeriesVisible(series);
377     }
378     
379     /**
380      * Returns a boolean that indicates whether or not the specified series
381      * should be drawn.
382      *
383      * @param series the series index.
384      *
385      * @return A boolean.
386      */

387     public boolean isSeriesVisible(int series) {
388
389         boolean result = this.baseSeriesVisible;
390         if (this.seriesVisible != null) {
391             result = this.seriesVisible.booleanValue();
392         }
393         else {
394             Boolean JavaDoc b = this.seriesVisibleList.getBoolean(series);
395             if (b != null) {
396                 result = b.booleanValue();
397             }
398         }
399         return result;
400     }
401     
402     /**
403      * Returns the flag that controls the visibility of ALL series. This flag
404      * overrides the per series and default settings - you must set it to
405      * <code>null</code> if you want the other settings to apply.
406      *
407      * @return The flag (possibly <code>null</code>).
408      */

409     public Boolean JavaDoc getSeriesVisible() {
410         return this.seriesVisible;
411     }
412     
413     /**
414      * Sets the flag that controls the visibility of ALL series and sends a
415      * {@link RendererChangeEvent} to all registered listeners. This flag
416      * overrides the per series and default settings - you must set it to
417      * <code>null</code> if you want the other settings to apply.
418      *
419      * @param visible the flag (<code>null</code> permitted).
420      */

421     public void setSeriesVisible(Boolean JavaDoc visible) {
422          setSeriesVisible(visible, true);
423     }
424     
425     /**
426      * Sets the flag that controls the visibility of ALL series and sends a
427      * {@link RendererChangeEvent} to all registered listeners. This flag
428      * overrides the per series and default settings - you must set it to
429      * <code>null</code> if you want the other settings to apply.
430      *
431      * @param visible the flag (<code>null</code> permitted).
432      * @param notify notify listeners?
433      */

434     public void setSeriesVisible(Boolean JavaDoc visible, boolean notify) {
435         this.seriesVisible = visible;
436         if (notify) {
437             notifyListeners(new RendererChangeEvent(this));
438         }
439     }
440     
441     /**
442      * Returns the flag that controls whether a series is visible.
443      *
444      * @param series the series index (zero-based).
445      *
446      * @return The flag (possibly <code>null</code>).
447      */

448     public Boolean JavaDoc getSeriesVisible(int series) {
449         return this.seriesVisibleList.getBoolean(series);
450     }
451     
452     /**
453      * Sets the flag that controls whether a series is visible and sends a
454      * {@link RendererChangeEvent} to all registered listeners.
455      *
456      * @param series the series index (zero-based).
457      * @param visible the flag (<code>null</code> permitted).
458      */

459     public void setSeriesVisible(int series, Boolean JavaDoc visible) {
460         setSeriesVisible(series, visible, true);
461     }
462     
463     /**
464      * Sets the flag that controls whether a series is visible and, if
465      * requested, sends a {@link RendererChangeEvent} to all registered
466      * listeners.
467      *
468      * @param series the series index.
469      * @param visible the flag (<code>null</code> permitted).
470      * @param notify notify listeners?
471      */

472     public void setSeriesVisible(int series, Boolean JavaDoc visible, boolean notify) {
473         this.seriesVisibleList.setBoolean(series, visible);
474         if (notify) {
475             notifyListeners(new RendererChangeEvent(this));
476         }
477     }
478
479     /**
480      * Returns the base visibility for all series.
481      *
482      * @return The base visibility.
483      */

484     public boolean getBaseSeriesVisible() {
485         return this.baseSeriesVisible;
486     }
487
488     /**
489      * Sets the base visibility and sends a {@link RendererChangeEvent}
490      * to all registered listeners.
491      *
492      * @param visible the flag.
493      */

494     public void setBaseSeriesVisible(boolean visible) {
495         // defer argument checking...
496
setBaseSeriesVisible(visible, true);
497     }
498     
499     /**
500      * Sets the base visibility and, if requested, sends
501      * a {@link RendererChangeEvent} to all registered listeners.
502      *
503      * @param visible the visibility.
504      * @param notify notify listeners?
505      */

506     public void setBaseSeriesVisible(boolean visible, boolean notify) {
507         this.baseSeriesVisible = visible;
508         if (notify) {
509             notifyListeners(new RendererChangeEvent(this));
510         }
511     }
512
513     // SERIES VISIBLE IN LEGEND (not yet respected by all renderers)
514

515     /**
516      * Returns <code>true</code> if the series should be shown in the legend,
517      * and <code>false</code> otherwise.
518      *
519      * @param series the series index.
520      *
521      * @return A boolean.
522      */

523     public boolean isSeriesVisibleInLegend(int series) {
524         boolean result = this.baseSeriesVisibleInLegend;
525         if (this.seriesVisibleInLegend != null) {
526             result = this.seriesVisibleInLegend.booleanValue();
527         }
528         else {
529             Boolean JavaDoc b = this.seriesVisibleInLegendList.getBoolean(series);
530             if (b != null) {
531                 result = b.booleanValue();
532             }
533         }
534         return result;
535     }
536     
537     /**
538      * Returns the flag that controls the visibility of ALL series in the
539      * legend. This flag overrides the per series and default settings - you
540      * must set it to <code>null</code> if you want the other settings to
541      * apply.
542      *
543      * @return The flag (possibly <code>null</code>).
544      */

545     public Boolean JavaDoc getSeriesVisibleInLegend() {
546         return this.seriesVisibleInLegend;
547     }
548     
549     /**
550      * Sets the flag that controls the visibility of ALL series in the legend
551      * and sends a {@link RendererChangeEvent} to all registered listeners.
552      * This flag overrides the per series and default settings - you must set
553      * it to <code>null</code> if you want the other settings to apply.
554      *
555      * @param visible the flag (<code>null</code> permitted).
556      */

557     public void setSeriesVisibleInLegend(Boolean JavaDoc visible) {
558          setSeriesVisibleInLegend(visible, true);
559     }
560     
561     /**
562      * Sets the flag that controls the visibility of ALL series in the legend
563      * and sends a {@link RendererChangeEvent} to all registered listeners.
564      * This flag overrides the per series and default settings - you must set
565      * it to <code>null</code> if you want the other settings to apply.
566      *
567      * @param visible the flag (<code>null</code> permitted).
568      * @param notify notify listeners?
569      */

570     public void setSeriesVisibleInLegend(Boolean JavaDoc visible, boolean notify) {
571         this.seriesVisibleInLegend = visible;
572         if (notify) {
573             notifyListeners(new RendererChangeEvent(this));
574         }
575     }
576     
577     /**
578      * Returns the flag that controls whether a series is visible in the
579      * legend. This method returns only the "per series" settings - to
580      * incorporate the override and base settings as well, you need to use the
581      * {@link #isSeriesVisibleInLegend(int)} method.
582      *
583      * @param series the series index (zero-based).
584      *
585      * @return The flag (possibly <code>null</code>).
586      */

587     public Boolean JavaDoc getSeriesVisibleInLegend(int series) {
588         return this.seriesVisibleInLegendList.getBoolean(series);
589     }
590     
591     /**
592      * Sets the flag that controls whether a series is visible in the legend
593      * and sends a {@link RendererChangeEvent} to all registered listeners.
594      *
595      * @param series the series index (zero-based).
596      * @param visible the flag (<code>null</code> permitted).
597      */

598     public void setSeriesVisibleInLegend(int series, Boolean JavaDoc visible) {
599         setSeriesVisibleInLegend(series, visible, true);
600     }
601     
602     /**
603      * Sets the flag that controls whether a series is visible in the legend
604      * and, if requested, sends a {@link RendererChangeEvent} to all registered
605      * listeners.
606      *
607      * @param series the series index.
608      * @param visible the flag (<code>null</code> permitted).
609      * @param notify notify listeners?
610      */

611     public void setSeriesVisibleInLegend(int series, Boolean JavaDoc visible,
612                                          boolean notify) {
613         this.seriesVisibleInLegendList.setBoolean(series, visible);
614         if (notify) {
615             notifyListeners(new RendererChangeEvent(this));
616         }
617     }
618
619     /**
620      * Returns the base visibility in the legend for all series.
621      *
622      * @return The base visibility.
623      */

624     public boolean getBaseSeriesVisibleInLegend() {
625         return this.baseSeriesVisibleInLegend;
626     }
627
628     /**
629      * Sets the base visibility in the legend and sends a
630      * {@link RendererChangeEvent} to all registered listeners.
631      *
632      * @param visible the flag.
633      */

634     public void setBaseSeriesVisibleInLegend(boolean visible) {
635         // defer argument checking...
636
setBaseSeriesVisibleInLegend(visible, true);
637     }
638     
639     /**
640      * Sets the base visibility in the legend and, if requested, sends
641      * a {@link RendererChangeEvent} to all registered listeners.
642      *
643      * @param visible the visibility.
644      * @param notify notify listeners?
645      */

646     public void setBaseSeriesVisibleInLegend(boolean visible, boolean notify) {
647         this.baseSeriesVisibleInLegend = visible;
648         if (notify) {
649             notifyListeners(new RendererChangeEvent(this));
650         }
651     }
652
653     // PAINT
654

655     /**
656      * Returns the paint used to fill data items as they are drawn.
657      * <p>
658      * The default implementation passes control to the
659      * <code>getSeriesPaint</code> method. You can override this method if you
660      * require different behaviour.
661      *
662      * @param row the row (or series) index (zero-based).
663      * @param column the column (or category) index (zero-based).
664      *
665      * @return The paint (never <code>null</code>).
666      */

667     public Paint JavaDoc getItemPaint(int row, int column) {
668         return getSeriesPaint(row);
669     }
670
671     /**
672      * Returns the paint used to fill an item drawn by the renderer.
673      *
674      * @param series the series index (zero-based).
675      *
676      * @return The paint (never <code>null</code>).
677      */

678     public Paint JavaDoc getSeriesPaint(int series) {
679
680         // return the override, if there is one...
681
if (this.paint != null) {
682             return this.paint;
683         }
684
685         // otherwise look up the paint list
686
Paint JavaDoc seriesPaint = this.paintList.getPaint(series);
687         if (seriesPaint == null) {
688             DrawingSupplier supplier = getDrawingSupplier();
689             if (supplier != null) {
690                 seriesPaint = supplier.getNextPaint();
691                 this.paintList.setPaint(series, seriesPaint);
692             }
693             else {
694                 seriesPaint = this.basePaint;
695             }
696         }
697         return seriesPaint;
698
699     }
700
701     /**
702      * Sets the paint to be used for ALL series, and sends a
703      * {@link RendererChangeEvent} to all registered listeners. If this is
704      * <code>null</code>, the renderer will use the paint for the series.
705      *
706      * @param paint the paint (<code>null</code> permitted).
707      */

708     public void setPaint(Paint JavaDoc paint) {
709         setPaint(paint, true);
710     }
711     
712     /**
713      * Sets the paint to be used for all series and, if requested, sends a
714      * {@link RendererChangeEvent} to all registered listeners.
715      *
716      * @param paint the paint (<code>null</code> permitted).
717      * @param notify notify listeners?
718      */

719     public void setPaint(Paint JavaDoc paint, boolean notify) {
720         this.paint = paint;
721         if (notify) {
722             notifyListeners(new RendererChangeEvent(this));
723         }
724     }
725     
726     /**
727      * Sets the paint used for a series and sends a {@link RendererChangeEvent}
728      * to all registered listeners.
729      *
730      * @param series the series index (zero-based).
731      * @param paint the paint (<code>null</code> permitted).
732      */

733     public void setSeriesPaint(int series, Paint JavaDoc paint) {
734         setSeriesPaint(series, paint, true);
735     }
736     
737     /**
738      * Sets the paint used for a series and, if requested, sends a
739      * {@link RendererChangeEvent} to all registered listeners.
740      *
741      * @param series the series index.
742      * @param paint the paint (<code>null</code> permitted).
743      * @param notify notify listeners?
744      */

745     public void setSeriesPaint(int series, Paint JavaDoc paint, boolean notify) {
746         this.paintList.setPaint(series, paint);
747         if (notify) {
748             notifyListeners(new RendererChangeEvent(this));
749         }
750     }
751
752     /**
753      * Returns the base paint.
754      *
755      * @return The base paint (never <code>null</code>).
756      */

757     public Paint JavaDoc getBasePaint() {
758         return this.basePaint;
759     }
760
761     /**
762      * Sets the base paint and sends a {@link RendererChangeEvent} to all
763      * registered listeners.
764      *
765      * @param paint the paint (<code>null</code> not permitted).
766      */

767     public void setBasePaint(Paint JavaDoc paint) {
768         // defer argument checking...
769
setBasePaint(paint, true);
770     }
771     
772     /**
773      * Sets the base paint and, if requested, sends a
774      * {@link RendererChangeEvent} to all registered listeners.
775      *
776      * @param paint the paint (<code>null</code> not permitted).
777      * @param notify notify listeners?
778      */

779     public void setBasePaint(Paint JavaDoc paint, boolean notify) {
780         this.basePaint = paint;
781         if (notify) {
782             notifyListeners(new RendererChangeEvent(this));
783         }
784     }
785
786     //// FILL PAINT //////////////////////////////////////////////////////////
787

788     /**
789      * Returns the paint used to fill data items as they are drawn. The
790      * default implementation passes control to the
791      * {@link #getSeriesFillPaint(int)} method - you can override this method
792      * if you require different behaviour.
793      *
794      * @param row the row (or series) index (zero-based).
795      * @param column the column (or category) index (zero-based).
796      *
797      * @return The paint (never <code>null</code>).
798      */

799     public Paint JavaDoc getItemFillPaint(int row, int column) {
800         return getSeriesFillPaint(row);
801     }
802
803     /**
804      * Returns the paint used to fill an item drawn by the renderer.
805      *
806      * @param series the series (zero-based index).
807      *
808      * @return The paint (never <code>null</code>).
809      */

810     public Paint JavaDoc getSeriesFillPaint(int series) {
811
812         // return the override, if there is one...
813
if (this.fillPaint != null) {
814             return this.fillPaint;
815         }
816
817         // otherwise look up the paint table
818
Paint JavaDoc seriesFillPaint = this.fillPaintList.getPaint(series);
819         if (seriesFillPaint == null) {
820             seriesFillPaint = this.baseFillPaint;
821         }
822         return seriesFillPaint;
823
824     }
825
826     /**
827      * Sets the paint used for a series fill and sends a
828      * {@link RendererChangeEvent} to all registered listeners.
829      *
830      * @param series the series index (zero-based).
831      * @param paint the paint (<code>null</code> permitted).
832      */

833     public void setSeriesFillPaint(int series, Paint JavaDoc paint) {
834         setSeriesFillPaint(series, paint, true);
835     }
836
837     /**
838      * Sets the paint used to fill a series and, if requested,
839      * sends a {@link RendererChangeEvent} to all registered listeners.
840      *
841      * @param series the series index (zero-based).
842      * @param paint the paint (<code>null</code> permitted).
843      * @param notify notify listeners?
844      */

845     public void setSeriesFillPaint(int series, Paint JavaDoc paint, boolean notify) {
846         this.fillPaintList.setPaint(series, paint);
847         if (notify) {
848             notifyListeners(new RendererChangeEvent(this));
849         }
850     }
851
852     /**
853      * Sets the fill paint for ALL series (optional).
854      *
855      * @param paint the paint (<code>null</code> permitted).
856      */

857     public void setFillPaint(Paint JavaDoc paint) {
858         setFillPaint(paint, true);
859     }
860
861     /**
862      * Sets the fill paint for ALL series and, if requested, sends a
863      * {@link RendererChangeEvent} to all registered listeners.
864      *
865      * @param paint the paint (<code>null</code> permitted).
866      * @param notify notify listeners?
867      */

868     public void setFillPaint(Paint JavaDoc paint, boolean notify) {
869         this.fillPaint = paint;
870         if (notify) {
871             notifyListeners(new RendererChangeEvent(this));
872         }
873     }
874     
875     /**
876      * Returns the base fill paint.
877      *
878      * @return The paint (never <code>null</code>).
879      */

880     public Paint JavaDoc getBaseFillPaint() {
881         return this.baseFillPaint;
882     }
883
884     /**
885      * Sets the base fill paint and sends a {@link RendererChangeEvent} to
886      * all registered listeners.
887      *
888      * @param paint the paint (<code>null</code> not permitted).
889      */

890     public void setBaseFillPaint(Paint JavaDoc paint) {
891         // defer argument checking...
892
setBaseFillPaint(paint, true);
893     }
894     
895     /**
896      * Sets the base fill paint and, if requested, sends a
897      * {@link RendererChangeEvent} to all registered listeners.
898      *
899      * @param paint the paint (<code>null</code> not permitted).
900      * @param notify notify listeners?
901      */

902     public void setBaseFillPaint(Paint JavaDoc paint, boolean notify) {
903         if (paint == null) {
904             throw new IllegalArgumentException JavaDoc("Null 'paint' argument.");
905         }
906         this.baseFillPaint = paint;
907         if (notify) {
908             notifyListeners(new RendererChangeEvent(this));
909         }
910     }
911
912     // OUTLINE PAINT //////////////////////////////////////////////////////////
913

914     /**
915      * Returns the paint used to outline data items as they are drawn.
916      * <p>
917      * The default implementation passes control to the getSeriesOutlinePaint
918      * method. You can override this method if you require different behaviour.
919      *
920      * @param row the row (or series) index (zero-based).
921      * @param column the column (or category) index (zero-based).
922      *
923      * @return The paint (never <code>null</code>).
924      */

925     public Paint JavaDoc getItemOutlinePaint(int row, int column) {
926         return getSeriesOutlinePaint(row);
927     }
928
929     /**
930      * Returns the paint used to outline an item drawn by the renderer.
931      *
932      * @param series the series (zero-based index).
933      *
934      * @return The paint (never <code>null</code>).
935      */

936     public Paint JavaDoc getSeriesOutlinePaint(int series) {
937
938         // return the override, if there is one...
939
if (this.outlinePaint != null) {
940             return this.outlinePaint;
941         }
942
943         // otherwise look up the paint table
944
Paint JavaDoc seriesOutlinePaint = this.outlinePaintList.getPaint(series);
945         if (seriesOutlinePaint == null) {
946             DrawingSupplier supplier = getDrawingSupplier();
947             if (supplier != null) {
948                 seriesOutlinePaint = supplier.getNextOutlinePaint();
949                 this.outlinePaintList.setPaint(series, seriesOutlinePaint);
950             }
951             else {
952                 seriesOutlinePaint = this.baseOutlinePaint;
953             }
954         }
955         return seriesOutlinePaint;
956
957     }
958
959     /**
960      * Sets the paint used for a series outline and sends a
961      * {@link RendererChangeEvent} to all registered listeners.
962      *
963      * @param series the series index (zero-based).
964      * @param paint the paint (<code>null</code> permitted).
965      */

966     public void setSeriesOutlinePaint(int series, Paint JavaDoc paint) {
967         setSeriesOutlinePaint(series, paint, true);
968     }
969
970     /**
971      * Sets the paint used to draw the outline for a series and, if requested,
972      * sends a {@link RendererChangeEvent} to all registered listeners.
973      *
974      * @param series the series index (zero-based).
975      * @param paint the paint (<code>null</code> permitted).
976      * @param notify notify listeners?
977      */

978     public void setSeriesOutlinePaint(int series, Paint JavaDoc paint, boolean notify) {
979         this.outlinePaintList.setPaint(series, paint);
980         if (notify) {
981             notifyListeners(new RendererChangeEvent(this));
982         }
983     }
984
985     /**
986      * Sets the outline paint for ALL series (optional).
987      *
988      * @param paint the paint (<code>null</code> permitted).
989      */

990     public void setOutlinePaint(Paint JavaDoc paint) {
991         setOutlinePaint(paint, true);
992     }
993
994     /**
995      * Sets the outline paint for ALL series and, if requested, sends a
996      * {@link RendererChangeEvent} to all registered listeners.
997      *
998      * @param paint the paint (<code>null</code> permitted).
999      * @param notify notify listeners?
1000     */

1001    public void setOutlinePaint(Paint JavaDoc paint, boolean notify) {
1002        this.outlinePaint = paint;
1003        if (notify) {
1004            notifyListeners(new RendererChangeEvent(this));
1005        }
1006    }
1007    
1008    /**
1009     * Returns the base outline paint.
1010     *
1011     * @return The paint (never <code>null</code>).
1012     */

1013    public Paint JavaDoc getBaseOutlinePaint() {
1014        return this.baseOutlinePaint;
1015    }
1016
1017    /**
1018     * Sets the base outline paint and sends a {@link RendererChangeEvent} to
1019     * all registered listeners.
1020     *
1021     * @param paint the paint (<code>null</code> not permitted).
1022     */

1023    public void setBaseOutlinePaint(Paint JavaDoc paint) {
1024        // defer argument checking...
1025
setBaseOutlinePaint(paint, true);
1026    }
1027    
1028    /**
1029     * Sets the base outline paint and, if requested, sends a
1030     * {@link RendererChangeEvent} to all registered listeners.
1031     *
1032     * @param paint the paint (<code>null</code> not permitted).
1033     * @param notify notify listeners?
1034     */

1035    public void setBaseOutlinePaint(Paint JavaDoc paint, boolean notify) {
1036        if (paint == null) {
1037            throw new IllegalArgumentException JavaDoc("Null 'paint' argument.");
1038        }
1039        this.baseOutlinePaint = paint;
1040        if (notify) {
1041            notifyListeners(new RendererChangeEvent(this));
1042        }
1043    }
1044
1045    // STROKE
1046

1047    /**
1048     * Returns the stroke used to draw data items.
1049     * <p>
1050     * The default implementation passes control to the getSeriesStroke method.
1051     * You can override this method if you require different behaviour.
1052     *
1053     * @param row the row (or series) index (zero-based).
1054     * @param column the column (or category) index (zero-based).
1055     *
1056     * @return The stroke (never <code>null</code>).
1057     */

1058    public Stroke JavaDoc getItemStroke(int row, int column) {
1059        return getSeriesStroke(row);
1060    }
1061
1062    /**
1063     * Returns the stroke used to draw the items in a series.
1064     *
1065     * @param series the series (zero-based index).
1066     *
1067     * @return The stroke (never <code>null</code>).
1068     */

1069    public Stroke JavaDoc getSeriesStroke(int series) {
1070
1071        // return the override, if there is one...
1072
if (this.stroke != null) {
1073            return this.stroke;
1074        }
1075
1076        // otherwise look up the paint table
1077
Stroke JavaDoc result = this.strokeList.getStroke(series);
1078        if (result == null) {
1079            DrawingSupplier supplier = getDrawingSupplier();
1080            if (supplier != null) {
1081                result = supplier.getNextStroke();
1082                this.strokeList.setStroke(series, result);
1083            }
1084            else {
1085                result = this.baseStroke;
1086            }
1087        }
1088        return result;
1089
1090    }
1091    
1092    /**
1093     * Sets the stroke for ALL series and sends a {@link RendererChangeEvent}
1094     * to all registered listeners.
1095     *
1096     * @param stroke the stroke (<code>null</code> permitted).
1097     */

1098    public void setStroke(Stroke JavaDoc stroke) {
1099        setStroke(stroke, true);
1100    }
1101    
1102    /**
1103     * Sets the stroke for ALL series and, if requested, sends a
1104     * {@link RendererChangeEvent} to all registered listeners.
1105     *
1106     * @param stroke the stroke (<code>null</code> permitted).
1107     * @param notify notify listeners?
1108     */

1109    public void setStroke(Stroke JavaDoc stroke, boolean notify) {
1110        this.stroke = stroke;
1111        if (notify) {
1112            notifyListeners(new RendererChangeEvent(this));
1113        }
1114    }
1115
1116    /**
1117     * Sets the stroke used for a series and sends a {@link RendererChangeEvent}
1118     * to all registered listeners.
1119     *
1120     * @param series the series index (zero-based).
1121     * @param stroke the stroke (<code>null</code> permitted).
1122     */

1123    public void setSeriesStroke(int series, Stroke JavaDoc stroke) {
1124        setSeriesStroke(series, stroke, true);
1125    }
1126    
1127    /**
1128     * Sets the stroke for a series and, if requested, sends a
1129     * {@link RendererChangeEvent} to all registered listeners.
1130     *
1131     * @param series the series index (zero-based).
1132     * @param stroke the stroke (<code>null</code> permitted).
1133     * @param notify notify listeners?
1134     */

1135    public void setSeriesStroke(int series, Stroke JavaDoc stroke, boolean notify) {
1136        this.strokeList.setStroke(series, stroke);
1137        if (notify) {
1138            notifyListeners(new RendererChangeEvent(this));
1139        }
1140    }
1141
1142    /**
1143     * Returns the base stroke.
1144     *
1145     * @return The base stroke (never <code>null</code>).
1146     */

1147    public Stroke JavaDoc getBaseStroke() {
1148        return this.baseStroke;
1149    }
1150
1151    /**
1152     * Sets the base stroke.
1153     *
1154     * @param stroke the stroke (<code>null</code> not permitted).
1155     */

1156    public void setBaseStroke(Stroke JavaDoc stroke) {
1157        // defer argument checking...
1158
setBaseStroke(stroke, true);
1159    }
1160
1161    /**
1162     * Sets the base stroke and, if requested, sends a
1163     * {@link RendererChangeEvent} to all registered listeners.
1164     *
1165     * @param stroke the stroke (<code>null</code> not permitted).
1166     * @param notify notify listeners?
1167     */

1168    public void setBaseStroke(Stroke JavaDoc stroke, boolean notify) {
1169        if (stroke == null) {
1170            throw new IllegalArgumentException JavaDoc("Null 'stroke' argument.");
1171        }
1172        this.baseStroke = stroke;
1173        if (notify) {
1174            notifyListeners(new RendererChangeEvent(this));
1175        }
1176    }
1177
1178    // OUTLINE STROKE
1179

1180    /**
1181     * Returns the stroke used to outline data items. The default
1182     * implementation passes control to the {@link #getSeriesOutlineStroke(int)}
1183     * method. You can override this method if you require different behaviour.
1184     *
1185     * @param row the row (or series) index (zero-based).
1186     * @param column the column (or category) index (zero-based).
1187     *
1188     * @return The stroke (never <code>null</code>).
1189     */

1190    public Stroke JavaDoc getItemOutlineStroke(int row, int column) {
1191        return getSeriesOutlineStroke(row);
1192    }
1193
1194    /**
1195     * Returns the stroke used to outline the items in a series.
1196     *
1197     * @param series the series (zero-based index).
1198     *
1199     * @return The stroke (never <code>null</code>).
1200     */

1201    public Stroke JavaDoc getSeriesOutlineStroke(int series) {
1202
1203        // return the override, if there is one...
1204
if (this.outlineStroke != null) {
1205            return this.outlineStroke;
1206        }
1207
1208        // otherwise look up the stroke table
1209
Stroke JavaDoc result = this.outlineStrokeList.getStroke(series);
1210        if (result == null) {
1211            DrawingSupplier supplier = getDrawingSupplier();
1212            if (supplier != null) {
1213                result = supplier.getNextOutlineStroke();
1214                this.outlineStrokeList.setStroke(series, result);
1215            }
1216            else {
1217                result = this.baseOutlineStroke;
1218            }
1219        }
1220        return result;
1221
1222    }
1223
1224    /**
1225     * Sets the outline stroke for ALL series and sends a
1226     * {@link RendererChangeEvent} to all registered listeners.
1227     *
1228     * @param stroke the stroke (<code>null</code> permitted).
1229     */

1230    public void setOutlineStroke(Stroke JavaDoc stroke) {
1231        setOutlineStroke(stroke, true);
1232    }
1233
1234    /**
1235     * Sets the outline stroke for ALL series and, if requested, sends a
1236     * {@link RendererChangeEvent} to all registered listeners.
1237     *
1238     * @param stroke the stroke (<code>null</code> permitted).
1239     * @param notify notify listeners?
1240     */

1241    public void setOutlineStroke(Stroke JavaDoc stroke, boolean notify) {
1242        this.outlineStroke = stroke;
1243        if (notify) {
1244            notifyListeners(new RendererChangeEvent(this));
1245        }
1246    }
1247    
1248    /**
1249     * Sets the outline stroke used for a series and sends a
1250     * {@link RendererChangeEvent} to all registered listeners.
1251     *
1252     * @param series the series index (zero-based).
1253     * @param stroke the stroke (<code>null</code> permitted).
1254     */

1255    public void setSeriesOutlineStroke(int series, Stroke JavaDoc stroke) {
1256        setSeriesOutlineStroke(series, stroke, true);
1257    }
1258
1259    /**
1260     * Sets the outline stroke for a series and, if requested, sends a
1261     * {@link RendererChangeEvent} to all registered listeners.
1262     *
1263     * @param series the series index.
1264     * @param stroke the stroke (<code>null</code> permitted).
1265     * @param notify notify listeners?
1266     */

1267    public void setSeriesOutlineStroke(int series, Stroke JavaDoc stroke,
1268                                       boolean notify) {
1269        this.outlineStrokeList.setStroke(series, stroke);
1270        if (notify) {
1271            notifyListeners(new RendererChangeEvent(this));
1272        }
1273    }
1274    
1275    /**
1276     * Returns the base outline stroke.
1277     *
1278     * @return The stroke (never <code>null</code>).
1279     */

1280    public Stroke JavaDoc getBaseOutlineStroke() {
1281        return this.baseOutlineStroke;
1282    }
1283
1284    /**
1285     * Sets the base outline stroke and sends a {@link RendererChangeEvent} to
1286     * all registered listeners.
1287     *
1288     * @param stroke the stroke (<code>null</code> not permitted).
1289     */

1290    public void setBaseOutlineStroke(Stroke JavaDoc stroke) {
1291        setBaseOutlineStroke(stroke, true);
1292    }
1293
1294    /**
1295     * Sets the base outline stroke and, if requested, sends a
1296     * {@link RendererChangeEvent} to all registered listeners.
1297     *
1298     * @param stroke the stroke (<code>null</code> not permitted).
1299     * @param notify a flag that controls whether or not listeners are
1300     * notified.
1301     */

1302    public void setBaseOutlineStroke(Stroke JavaDoc stroke, boolean notify) {
1303        if (stroke == null) {
1304            throw new IllegalArgumentException JavaDoc("Null 'stroke' argument.");
1305        }
1306        this.baseOutlineStroke = stroke;
1307        if (notify) {
1308            notifyListeners(new RendererChangeEvent(this));
1309        }
1310    }
1311    
1312    // SHAPE
1313

1314    /**
1315     * Returns a shape used to represent a data item.
1316     * <p>
1317     * The default implementation passes control to the getSeriesShape method.
1318     * You can override this method if you require different behaviour.
1319     *
1320     * @param row the row (or series) index (zero-based).
1321     * @param column the column (or category) index (zero-based).
1322     *
1323     * @return The shape (never <code>null</code>).
1324     */

1325    public Shape JavaDoc getItemShape(int row, int column) {
1326        return getSeriesShape(row);
1327    }
1328
1329    /**
1330     * Returns a shape used to represent the items in a series.
1331     *
1332     * @param series the series (zero-based index).
1333     *
1334     * @return The shape (never <code>null</code>).
1335     */

1336    public Shape JavaDoc getSeriesShape(int series) {
1337
1338        // return the override, if there is one...
1339
if (this.shape != null) {
1340            return this.shape;
1341        }
1342
1343        // otherwise look up the shape list
1344
Shape JavaDoc result = this.shapeList.getShape(series);
1345        if (result == null) {
1346            DrawingSupplier supplier = getDrawingSupplier();
1347            if (supplier != null) {
1348                result = supplier.getNextShape();
1349                this.shapeList.setShape(series, result);
1350            }
1351            else {
1352                result = this.baseShape;
1353            }
1354        }
1355        return result;
1356
1357    }
1358
1359    /**
1360     * Sets the shape for ALL series (optional) and sends a
1361     * {@link RendererChangeEvent} to all registered listeners.
1362     *
1363     * @param shape the shape (<code>null</code> permitted).
1364     */

1365    public void setShape(Shape JavaDoc shape) {
1366        setShape(shape, true);
1367    }
1368    
1369    /**
1370     * Sets the shape for ALL series and, if requested, sends a
1371     * {@link RendererChangeEvent} to all registered listeners.
1372     *
1373     * @param shape the shape (<code>null</code> permitted).
1374     * @param notify notify listeners?
1375     */

1376    public void setShape(Shape JavaDoc shape, boolean notify) {
1377        this.shape = shape;
1378        if (notify) {
1379            notifyListeners(new RendererChangeEvent(this));
1380        }
1381    }
1382    
1383    /**
1384     * Sets the shape used for a series and sends a {@link RendererChangeEvent}
1385     * to all registered listeners.
1386     *
1387     * @param series the series index (zero-based).
1388     * @param shape the shape (<code>null</code> permitted).
1389     */

1390    public void setSeriesShape(int series, Shape JavaDoc shape) {
1391        setSeriesShape(series, shape, true);
1392    }
1393
1394    /**
1395     * Sets the shape for a series and, if requested, sends a
1396     * {@link RendererChangeEvent} to all registered listeners.
1397     *
1398     * @param series the series index (zero based).
1399     * @param shape the shape (<code>null</code> permitted).
1400     * @param notify notify listeners?
1401     */

1402    public void setSeriesShape(int series, Shape JavaDoc shape, boolean notify) {
1403        this.shapeList.setShape(series, shape);
1404        if (notify) {
1405            notifyListeners(new RendererChangeEvent(this));
1406        }
1407    }
1408    
1409    /**
1410     * Returns the base shape.
1411     *
1412     * @return The shape (never <code>null</code>).
1413     */

1414    public Shape JavaDoc getBaseShape() {
1415        return this.baseShape;
1416    }
1417
1418    /**
1419     * Sets the base shape and sends a {@link RendererChangeEvent} to all
1420     * registered listeners.
1421     *
1422     * @param shape the shape (<code>null</code> not permitted).
1423     */

1424    public void setBaseShape(Shape JavaDoc shape) {
1425        // defer argument checking...
1426
setBaseShape(shape, true);
1427    }
1428
1429    /**
1430     * Sets the base shape and, if requested, sends a
1431     * {@link RendererChangeEvent} to all registered listeners.
1432     *
1433     * @param shape the shape (<code>null</code> not permitted).
1434     * @param notify notify listeners?
1435     */

1436    public void setBaseShape(Shape JavaDoc shape, boolean notify) {
1437        if (shape == null) {
1438            throw new IllegalArgumentException JavaDoc("Null 'shape' argument.");
1439        }
1440        this.baseShape = shape;
1441        if (notify) {
1442            notifyListeners(new RendererChangeEvent(this));
1443        }
1444    }
1445    
1446    // ITEM LABEL VISIBILITY...
1447

1448    /**
1449     * Returns <code>true</code> if an item label is visible, and
1450     * <code>false</code> otherwise.
1451     *
1452     * @param row the row index (zero-based).
1453     * @param column the column index (zero-based).
1454     *
1455     * @return A boolean.
1456     */

1457    public boolean isItemLabelVisible(int row, int column) {
1458        return isSeriesItemLabelsVisible(row);
1459    }
1460
1461    /**
1462     * Returns <code>true</code> if the item labels for a series are visible,
1463     * and <code>false</code> otherwise.
1464     *
1465     * @param series the series index (zero-based).
1466     *
1467     * @return A boolean.
1468     */

1469    public boolean isSeriesItemLabelsVisible(int series) {
1470
1471        // return the override, if there is one...
1472
if (this.itemLabelsVisible != null) {
1473            return this.itemLabelsVisible.booleanValue();
1474        }
1475
1476        // otherwise look up the boolean table
1477
Boolean JavaDoc b = this.itemLabelsVisibleList.getBoolean(series);
1478        if (b == null) {
1479            b = this.baseItemLabelsVisible;
1480        }
1481        if (b == null) {
1482            b = Boolean.FALSE;
1483        }
1484        return b.booleanValue();
1485
1486    }
1487    
1488    /**
1489     * Sets the visibility of the item labels for ALL series.
1490     *
1491     * @param visible the flag.
1492     */

1493    public void setItemLabelsVisible(boolean visible) {
1494        setItemLabelsVisible(BooleanUtilities.valueOf(visible));
1495        // The following alternative is only supported in JDK 1.4 - we support
1496
// JDK 1.2.2
1497
// setItemLabelsVisible(Boolean.valueOf(visible));
1498
}
1499    
1500    /**
1501     * Sets the visibility of the item labels for ALL series (optional).
1502     *
1503     * @param visible the flag (<code>null</code> permitted).
1504     */

1505    public void setItemLabelsVisible(Boolean JavaDoc visible) {
1506        setItemLabelsVisible(visible, true);
1507    }
1508    
1509    /**
1510     * Sets the visibility of item labels for ALL series and, if requested,
1511     * sends a {@link RendererChangeEvent} to all registered listeners.
1512     *
1513     * @param visible a flag that controls whether or not the item labels are
1514     * visible (<code>null</code> permitted).
1515     * @param notify a flag that controls whether or not listeners are
1516     * notified.
1517     */

1518    public void setItemLabelsVisible(Boolean JavaDoc visible, boolean notify) {
1519        this.itemLabelsVisible = visible;
1520        if (notify) {
1521            notifyListeners(new RendererChangeEvent(this));
1522        }
1523    }
1524
1525    /**
1526     * Sets a flag that controls the visibility of the item labels for a series.
1527     *
1528     * @param series the series index (zero-based).
1529     * @param visible the flag.
1530     */

1531    public void setSeriesItemLabelsVisible(int series, boolean visible) {
1532        setSeriesItemLabelsVisible(series, BooleanUtilities.valueOf(visible));
1533    }
1534    
1535    /**
1536     * Sets the visibility of the item labels for a series.
1537     *
1538     * @param series the series index (zero-based).
1539     * @param visible the flag (<code>null</code> permitted).
1540     */

1541    public void setSeriesItemLabelsVisible(int series, Boolean JavaDoc visible) {
1542        setSeriesItemLabelsVisible(series, visible, true);
1543    }
1544
1545    /**
1546     * Sets the visibility of item labels for a series and, if requested, sends
1547     * a {@link RendererChangeEvent} to all registered listeners.
1548     *
1549     * @param series the series index (zero-based).
1550     * @param visible the visible flag.
1551     * @param notify a flag that controls whether or not listeners are
1552     * notified.
1553     */

1554    public void setSeriesItemLabelsVisible(int series, Boolean JavaDoc visible,
1555                                           boolean notify) {
1556        this.itemLabelsVisibleList.setBoolean(series, visible);
1557        if (notify) {
1558            notifyListeners(new RendererChangeEvent(this));
1559        }
1560    }
1561
1562    /**
1563     * Returns the base setting for item label visibility.
1564     *
1565     * @return A flag (possibly <code>null</code>).
1566     */

1567    public Boolean JavaDoc getBaseItemLabelsVisible() {
1568        return this.baseItemLabelsVisible;
1569    }
1570
1571    /**
1572     * Sets the base flag that controls whether or not item labels are visible.
1573     *
1574     * @param visible the flag.
1575     */

1576    public void setBaseItemLabelsVisible(boolean visible) {
1577        setBaseItemLabelsVisible(BooleanUtilities.valueOf(visible));
1578    }
1579    
1580    /**
1581     * Sets the base setting for item label visibility.
1582     *
1583     * @param visible the flag (<code>null</code> permitted).
1584     */

1585    public void setBaseItemLabelsVisible(Boolean JavaDoc visible) {
1586        setBaseItemLabelsVisible(visible, true);
1587    }
1588
1589    /**
1590     * Sets the base visibility for item labels and, if requested, sends a
1591     * {@link RendererChangeEvent} to all registered listeners.
1592     *
1593     * @param visible the visibility flag.
1594     * @param notify a flag that controls whether or not listeners are
1595     * notified.
1596     */

1597    public void setBaseItemLabelsVisible(Boolean JavaDoc visible, boolean notify) {
1598        this.baseItemLabelsVisible = visible;
1599        if (notify) {
1600            notifyListeners(new RendererChangeEvent(this));
1601        }
1602    }
1603
1604    //// ITEM LABEL FONT //////////////////////////////////////////////////////
1605

1606    /**
1607     * Returns the font for an item label.
1608     *
1609     * @param row the row index (zero-based).
1610     * @param column the column index (zero-based).
1611     *
1612     * @return The font (never <code>null</code>).
1613     */

1614    public Font JavaDoc getItemLabelFont(int row, int column) {
1615        Font JavaDoc result = this.itemLabelFont;
1616        if (result == null) {
1617            result = getSeriesItemLabelFont(row);
1618            if (result == null) {
1619                result = this.baseItemLabelFont;
1620            }
1621        }
1622        return result;
1623    }
1624
1625    /**
1626     * Returns the font used for all item labels. This may be
1627     * <code>null</code>, in which case the per series font settings will apply.
1628     *
1629     * @return The font (possibly <code>null</code>).
1630     */

1631    public Font JavaDoc getItemLabelFont() {
1632        return this.itemLabelFont;
1633    }
1634    
1635    /**
1636     * Sets the item label font for ALL series and sends a
1637     * {@link RendererChangeEvent} to all registered listeners. You can set
1638     * this to <code>null</code> if you prefer to set the font on a per series
1639     * basis.
1640     *
1641     * @param font the font (<code>null</code> permitted).
1642     */

1643    public void setItemLabelFont(Font JavaDoc font) {
1644        setItemLabelFont(font, true);
1645    }
1646    
1647    /**
1648     * Sets the item label font for ALL series and, if requested, sends a
1649     * {@link RendererChangeEvent} to all registered listeners.
1650     *
1651     * @param font the font (<code>null</code> permitted).
1652     * @param notify a flag that controls whether or not listeners are
1653     * notified.
1654     */

1655    public void setItemLabelFont(Font JavaDoc font, boolean notify) {
1656        this.itemLabelFont = font;
1657        if (notify) {
1658            notifyListeners(new RendererChangeEvent(this));
1659        }
1660    }
1661
1662    /**
1663     * Returns the font for all the item labels in a series.
1664     *
1665     * @param series the series index (zero-based).
1666     *
1667     * @return The font (possibly <code>null</code>).
1668     */

1669    public Font JavaDoc getSeriesItemLabelFont(int series) {
1670        return (Font JavaDoc) this.itemLabelFontList.get(series);
1671    }
1672
1673    /**
1674     * Sets the item label font for a series and sends a
1675     * {@link RendererChangeEvent} to all registered listeners.
1676     *
1677     * @param series the series index (zero-based).
1678     * @param font the font (<code>null</code> permitted).
1679     */

1680    public void setSeriesItemLabelFont(int series, Font JavaDoc font) {
1681        setSeriesItemLabelFont(series, font, true);
1682    }
1683
1684    /**
1685     * Sets the item label font for a series and, if requested, sends a
1686     * {@link RendererChangeEvent} to all registered listeners.
1687     *
1688     * @param series the series index (zero based).
1689     * @param font the font (<code>null</code> permitted).
1690     * @param notify a flag that controls whether or not listeners are
1691     * notified.
1692     */

1693    public void setSeriesItemLabelFont(int series, Font JavaDoc font, boolean notify) {
1694        this.itemLabelFontList.set(series, font);
1695        if (notify) {
1696            notifyListeners(new RendererChangeEvent(this));
1697        }
1698    }
1699    
1700    /**
1701     * Returns the base item label font (this is used when no other font
1702     * setting is available).
1703     *
1704     * @return The font (<code>never</code> null).
1705     */

1706    public Font JavaDoc getBaseItemLabelFont() {
1707        return this.baseItemLabelFont;
1708    }
1709
1710    /**
1711     * Sets the base item label font and sends a {@link RendererChangeEvent} to
1712     * all registered listeners.
1713     *
1714     * @param font the font (<code>null</code> not permitted).
1715     */

1716    public void setBaseItemLabelFont(Font JavaDoc font) {
1717        if (font == null) {
1718            throw new IllegalArgumentException JavaDoc("Null 'font' argument.");
1719        }
1720        setBaseItemLabelFont(font, true);
1721    }
1722
1723    /**
1724     * Sets the base item label font and, if requested, sends a
1725     * {@link RendererChangeEvent} to all registered listeners.
1726     *
1727     * @param font the font (<code>null</code> not permitted).
1728     * @param notify a flag that controls whether or not listeners are
1729     * notified.
1730     */

1731    public void setBaseItemLabelFont(Font JavaDoc font, boolean notify) {
1732        this.baseItemLabelFont = font;
1733        if (notify) {
1734            notifyListeners(new RendererChangeEvent(this));
1735        }
1736    }
1737
1738    //// ITEM LABEL PAINT ////////////////////////////////////////////////////
1739

1740    /**
1741     * Returns the paint used to draw an item label.
1742     *
1743     * @param row the row index (zero based).
1744     * @param column the column index (zero based).
1745     *
1746     * @return The paint (never <code>null</code>).
1747     */

1748    public Paint JavaDoc getItemLabelPaint(int row, int column) {
1749        Paint JavaDoc result = this.itemLabelPaint;
1750        if (result == null) {
1751            result = getSeriesItemLabelPaint(row);
1752            if (result == null) {
1753                result = this.baseItemLabelPaint;
1754            }
1755        }
1756        return result;
1757    }
1758    
1759    /**
1760     * Returns the paint used for all item labels. This may be
1761     * <code>null</code>, in which case the per series paint settings will
1762     * apply.
1763     *
1764     * @return The paint (possibly <code>null</code>).
1765     */

1766    public Paint JavaDoc getItemLabelPaint() {
1767        return this.itemLabelPaint;
1768    }
1769
1770    /**
1771     * Sets the item label paint for ALL series and sends a
1772     * {@link RendererChangeEvent} to all registered listeners.
1773     *
1774     * @param paint the paint (<code>null</code> permitted).
1775     */

1776    public void setItemLabelPaint(Paint JavaDoc paint) {
1777        setItemLabelPaint(paint, true);
1778    }
1779
1780    /**
1781     * Sets the item label paint for ALL series and, if requested, sends a
1782     * {@link RendererChangeEvent} to all registered listeners.
1783     *
1784     * @param paint the paint.
1785     * @param notify a flag that controls whether or not listeners are
1786     * notified.
1787     */

1788    public void setItemLabelPaint(Paint JavaDoc paint, boolean notify) {
1789        this.itemLabelPaint = paint;
1790        if (notify) {
1791            notifyListeners(new RendererChangeEvent(this));
1792        }
1793    }
1794    
1795    /**
1796     * Returns the paint used to draw the item labels for a series.
1797     *
1798     * @param series the series index (zero based).
1799     *
1800     * @return The paint (possibly <code>null<code>).
1801     */

1802    public Paint JavaDoc getSeriesItemLabelPaint(int series) {
1803        return this.itemLabelPaintList.getPaint(series);
1804    }
1805
1806    /**
1807     * Sets the item label paint for a series and sends a
1808     * {@link RendererChangeEvent} to all registered listeners.
1809     *
1810     * @param series the series (zero based index).
1811     * @param paint the paint (<code>null</code> permitted).
1812     */

1813    public void setSeriesItemLabelPaint(int series, Paint JavaDoc paint) {
1814        setSeriesItemLabelPaint(series, paint, true);
1815    }
1816    
1817    /**
1818     * Sets the item label paint for a series and, if requested, sends a
1819     * {@link RendererChangeEvent} to all registered listeners.
1820     *
1821     * @param series the series index (zero based).
1822     * @param paint the paint (<code>null</code> permitted).
1823     * @param notify a flag that controls whether or not listeners are
1824     * notified.
1825     */

1826    public void setSeriesItemLabelPaint(int series, Paint JavaDoc paint,
1827                                        boolean notify) {
1828        this.itemLabelPaintList.setPaint(series, paint);
1829        if (notify) {
1830            notifyListeners(new RendererChangeEvent(this));
1831        }
1832    }
1833    
1834    /**
1835     * Returns the base item label paint.
1836     *
1837     * @return The paint (never <code>null<code>).
1838     */

1839    public Paint JavaDoc getBaseItemLabelPaint() {
1840        return this.baseItemLabelPaint;
1841    }
1842
1843    /**
1844     * Sets the base item label paint and sends a {@link RendererChangeEvent}
1845     * to all registered listeners.
1846     *
1847     * @param paint the paint (<code>null</code> not permitted).
1848     */

1849    public void setBaseItemLabelPaint(Paint JavaDoc paint) {
1850        // defer argument checking...
1851
setBaseItemLabelPaint(paint, true);
1852    }
1853
1854    /**
1855     * Sets the base item label paint and, if requested, sends a
1856     * {@link RendererChangeEvent} to all registered listeners..
1857     *
1858     * @param paint the paint (<code>null</code> not permitted).
1859     * @param notify a flag that controls whether or not listeners are
1860     * notified.
1861     */

1862    public void setBaseItemLabelPaint(Paint JavaDoc paint, boolean notify) {
1863        if (paint == null) {
1864            throw new IllegalArgumentException JavaDoc("Null 'paint' argument.");
1865        }
1866        this.baseItemLabelPaint = paint;
1867        if (notify) {
1868            notifyListeners(new RendererChangeEvent(this));
1869        }
1870    }
1871    
1872    // POSITIVE ITEM LABEL POSITION...
1873

1874    /**
1875     * Returns the item label position for positive values.
1876     *
1877     * @param row the row index (zero-based).
1878     * @param column the column index (zero-based).
1879     *
1880     * @return The item label position (never <code>null</code>).
1881     */

1882    public ItemLabelPosition getPositiveItemLabelPosition(int row, int column) {
1883        return getSeriesPositiveItemLabelPosition(row);
1884    }
1885
1886    /**
1887     * Returns the item label position for positive values in ALL series.
1888     *
1889     * @return The item label position (possibly <code>null</code>).
1890     */

1891    public ItemLabelPosition getPositiveItemLabelPosition() {
1892        return this.positiveItemLabelPosition;
1893    }
1894
1895    /**
1896     * Sets the item label position for positive values in ALL series, and
1897     * sends a {@link RendererChangeEvent} to all registered listeners. You
1898     * need to set this to <code>null</code> to expose the settings for
1899     * individual series.
1900     *
1901     * @param position the position (<code>null</code> permitted).
1902     */

1903    public void setPositiveItemLabelPosition(ItemLabelPosition position) {
1904        setPositiveItemLabelPosition(position, true);
1905    }
1906    
1907    /**
1908     * Sets the positive item label position for ALL series and (if requested)
1909     * sends a {@link RendererChangeEvent} to all registered listeners.
1910     *
1911     * @param position the position (<code>null</code> permitted).
1912     * @param notify notify registered listeners?
1913     */

1914    public void setPositiveItemLabelPosition(ItemLabelPosition position,
1915                                             boolean notify) {
1916        this.positiveItemLabelPosition = position;
1917        if (notify) {
1918            notifyListeners(new RendererChangeEvent(this));
1919        }
1920    }
1921
1922    /**
1923     * Returns the item label position for all positive values in a series.
1924     *
1925     * @param series the series index (zero-based).
1926     *
1927     * @return The item label position (never <code>null</code>).
1928     */

1929    public ItemLabelPosition getSeriesPositiveItemLabelPosition(int series) {
1930
1931        // return the override, if there is one...
1932
if (this.positiveItemLabelPosition != null) {
1933            return this.positiveItemLabelPosition;
1934        }
1935
1936        // otherwise look up the position table
1937
ItemLabelPosition position = (ItemLabelPosition)
1938            this.positiveItemLabelPositionList.get(series);
1939        if (position == null) {
1940            position = this.basePositiveItemLabelPosition;
1941        }
1942        return position;
1943
1944    }
1945    
1946    /**
1947     * Sets the item label position for all positive values in a series and
1948     * sends a {@link RendererChangeEvent} to all registered listeners.
1949     *
1950     * @param series the series index (zero-based).
1951     * @param position the position (<code>null</code> permitted).
1952     */

1953    public void setSeriesPositiveItemLabelPosition(int series,
1954                                                   ItemLabelPosition position) {
1955        setSeriesPositiveItemLabelPosition(series, position, true);
1956    }
1957
1958    /**
1959     * Sets the item label position for all positive values in a series and (if
1960     * requested) sends a {@link RendererChangeEvent} to all registered
1961     * listeners.
1962     *
1963     * @param series the series index (zero-based).
1964     * @param position the position (<code>null</code> permitted).
1965     * @param notify notify registered listeners?
1966     */

1967    public void setSeriesPositiveItemLabelPosition(int series,
1968                                                   ItemLabelPosition position,
1969                                                   boolean notify) {
1970        this.positiveItemLabelPositionList.set(series, position);
1971        if (notify) {
1972            notifyListeners(new RendererChangeEvent(this));
1973        }
1974    }
1975
1976    /**
1977     * Returns the base positive item label position.
1978     *
1979     * @return The position (never <code>null</code>).
1980     */

1981    public ItemLabelPosition getBasePositiveItemLabelPosition() {
1982        return this.basePositiveItemLabelPosition;
1983    }
1984
1985    /**
1986     * Sets the base positive item label position.
1987     *
1988     * @param position the position (<code>null</code> not permitted).
1989     */

1990    public void setBasePositiveItemLabelPosition(ItemLabelPosition position) {
1991        // defer argument checking...
1992
setBasePositiveItemLabelPosition(position, true);
1993    }
1994    
1995    /**
1996     * Sets the base positive item label position and, if requested, sends a
1997     * {@link RendererChangeEvent} to all registered listeners.
1998     *
1999     * @param position the position (<code>null</code> not permitted).
2000     * @param notify notify registered listeners?
2001     */

2002    public void setBasePositiveItemLabelPosition(ItemLabelPosition position,
2003                                                 boolean notify) {
2004        if (position == null) {
2005            throw new IllegalArgumentException JavaDoc("Null 'position' argument.");
2006        }
2007        this.basePositiveItemLabelPosition = position;
2008        if (notify) {
2009            notifyListeners(new RendererChangeEvent(this));
2010        }
2011    }
2012
2013    // NEGATIVE ITEM LABEL POSITION...
2014

2015    /**
2016     * Returns the item label position for negative values. This method can be
2017     * overridden to provide customisation of the item label position for
2018     * individual data items.
2019     *
2020     * @param row the row index (zero-based).
2021     * @param column the column (zero-based).
2022     *
2023     * @return The item label position (never <code>null</code>).
2024     */

2025    public ItemLabelPosition getNegativeItemLabelPosition(int row, int column) {
2026        return getSeriesNegativeItemLabelPosition(row);
2027    }
2028
2029    /**
2030     * Returns the item label position for negative values in ALL series.
2031     *
2032     * @return The item label position (possibly <code>null</code>).
2033     */

2034    public ItemLabelPosition getNegativeItemLabelPosition() {
2035        return this.negativeItemLabelPosition;
2036    }
2037
2038    /**
2039     * Sets the item label position for negative values in ALL series, and
2040     * sends a {@link RendererChangeEvent} to all registered listeners. You
2041     * need to set this to <code>null</code> to expose the settings for
2042     * individual series.
2043     *
2044     * @param position the position (<code>null</code> permitted).
2045     */

2046    public void setNegativeItemLabelPosition(ItemLabelPosition position) {
2047        setNegativeItemLabelPosition(position, true);
2048    }
2049    
2050    /**
2051     * Sets the item label position for negative values in ALL series and (if
2052     * requested) sends a {@link RendererChangeEvent} to all registered
2053     * listeners.
2054     *
2055     * @param position the position (<code>null</code> permitted).
2056     * @param notify notify registered listeners?
2057     */

2058    public void setNegativeItemLabelPosition(ItemLabelPosition position,
2059                                             boolean notify) {
2060        this.negativeItemLabelPosition = position;
2061        if (notify) {
2062            notifyListeners(new RendererChangeEvent(this));
2063        }
2064    }
2065
2066    /**
2067     * Returns the item label position for all negative values in a series.
2068     *
2069     * @param series the series index (zero-based).
2070     *
2071     * @return The item label position (never <code>null</code>).
2072     */

2073    public ItemLabelPosition getSeriesNegativeItemLabelPosition(int series) {
2074
2075        // return the override, if there is one...
2076
if (this.negativeItemLabelPosition != null) {
2077            return this.negativeItemLabelPosition;
2078        }
2079
2080        // otherwise look up the position list
2081
ItemLabelPosition position = (ItemLabelPosition)
2082            this.negativeItemLabelPositionList.get(series);
2083        if (position == null) {
2084            position = this.baseNegativeItemLabelPosition;
2085        }
2086        return position;
2087
2088    }
2089
2090    /**
2091     * Sets the item label position for negative values in a series and sends a
2092     * {@link RendererChangeEvent} to all registered listeners.
2093     *
2094     * @param series the series index (zero-based).
2095     * @param position the position (<code>null</code> permitted).
2096     */

2097    public void setSeriesNegativeItemLabelPosition(int series,
2098                                                   ItemLabelPosition position) {
2099        setSeriesNegativeItemLabelPosition(series, position, true);
2100    }
2101
2102    /**
2103     * Sets the item label position for negative values in a series and (if
2104     * requested) sends a {@link RendererChangeEvent} to all registered
2105     * listeners.
2106     *
2107     * @param series the series index (zero-based).
2108     * @param position the position (<code>null</code> permitted).
2109     * @param notify notify registered listeners?
2110     */

2111    public void setSeriesNegativeItemLabelPosition(int series,
2112                                                   ItemLabelPosition position,
2113                                                   boolean notify) {
2114        this.negativeItemLabelPositionList.set(series, position);
2115        if (notify) {
2116            notifyListeners(new RendererChangeEvent(this));
2117        }
2118    }
2119
2120    /**
2121     * Returns the base item label position for negative values.
2122     *
2123     * @return The position (never <code>null</code>).
2124     */

2125    public ItemLabelPosition getBaseNegativeItemLabelPosition() {
2126        return this.baseNegativeItemLabelPosition;
2127    }
2128
2129    /**
2130     * Sets the base item label position for negative values and sends a
2131     * {@link RendererChangeEvent} to all registered listeners.
2132     *
2133     * @param position the position (<code>null</code> not permitted).
2134     */

2135    public void setBaseNegativeItemLabelPosition(ItemLabelPosition position) {
2136        setBaseNegativeItemLabelPosition(position, true);
2137    }
2138    
2139    /**
2140     * Sets the base negative item label position and, if requested, sends a
2141     * {@link RendererChangeEvent} to all registered listeners.
2142     *
2143     * @param position the position (<code>null</code> not permitted).
2144     * @param notify notify registered listeners?
2145     */

2146    public void setBaseNegativeItemLabelPosition(ItemLabelPosition position,
2147                                                 boolean notify) {
2148        if (position == null) {
2149            throw new IllegalArgumentException JavaDoc("Null 'position' argument.");
2150        }
2151        this.baseNegativeItemLabelPosition = position;
2152        if (notify) {
2153            notifyListeners(new RendererChangeEvent(this));
2154        }
2155    }
2156
2157    /**
2158     * Returns the item label anchor offset.
2159     *
2160     * @return The offset.
2161     */

2162    public double getItemLabelAnchorOffset() {
2163        return this.itemLabelAnchorOffset;
2164    }
2165
2166    /**
2167     * Sets the item label anchor offset.
2168     *
2169     * @param offset the offset.
2170     */

2171    public void setItemLabelAnchorOffset(double offset) {
2172        this.itemLabelAnchorOffset = offset;
2173        notifyListeners(new RendererChangeEvent(this));
2174    }
2175
2176    /**
2177     * Returns a boolean that indicates whether or not the specified item
2178     * should have a chart entity created for it.
2179     *
2180     * @param series the series index.
2181     * @param item the item index.
2182     *
2183     * @return A boolean.
2184     */

2185    public boolean getItemCreateEntity(int series, int item) {
2186        if (this.createEntities != null) {
2187            return this.createEntities.booleanValue();
2188        }
2189        else {
2190            Boolean JavaDoc b = getSeriesCreateEntities(series);
2191            if (b != null) {
2192                return b.booleanValue();
2193            }
2194            else {
2195                return this.baseCreateEntities;
2196            }
2197        }
2198    }
2199    
2200    /**
2201     * Returns the flag that controls whether or not chart entities are created
2202     * for the items in ALL series. This flag overrides the per series and
2203     * default settings - you must set it to <code>null</code> if you want the
2204     * other settings to apply.
2205     *
2206     * @return The flag (possibly <code>null</code>).
2207     */

2208    public Boolean JavaDoc getCreateEntities() {
2209        return this.createEntities;
2210    }
2211    
2212    /**
2213     * Sets the flag that controls whether or not chart entities are created
2214     * for the items in ALL series, and sends a {@link RendererChangeEvent} to
2215     * all registered listeners. This flag overrides the per series and
2216     * default settings - you must set it to <code>null</code> if you want the
2217     * other settings to apply.
2218     *
2219     * @param create the flag (<code>null</code> permitted).
2220     */

2221    public void setCreateEntities(Boolean JavaDoc create) {
2222         setCreateEntities(create, true);
2223    }
2224    
2225    /**
2226     * Sets the flag that controls whether or not chart entities are created
2227     * for the items in ALL series, and sends a {@link RendererChangeEvent} to
2228     * all registered listeners. This flag overrides the per series and
2229     * default settings - you must set it to <code>null</code> if you want the
2230     * other settings to apply.
2231     *
2232     * @param create the flag (<code>null</code> permitted).
2233     * @param notify notify listeners?
2234     */

2235    public void setCreateEntities(Boolean JavaDoc create, boolean notify) {
2236        this.createEntities = create;
2237        if (notify) {
2238            notifyListeners(new RendererChangeEvent(this));
2239        }
2240    }
2241    
2242    /**
2243     * Returns the flag that controls whether entities are created for a
2244     * series.
2245     *
2246     * @param series the series index (zero-based).
2247     *
2248     * @return The flag (possibly <code>null</code>).
2249     */

2250    public Boolean JavaDoc getSeriesCreateEntities(int series) {
2251        return this.createEntitiesList.getBoolean(series);
2252    }
2253    
2254    /**
2255     * Sets the flag that controls whether entities are created for a series,
2256     * and sends a {@link RendererChangeEvent} to all registered listeners.
2257     *
2258     * @param series the series index (zero-based).
2259     * @param create the flag (<code>null</code> permitted).
2260     */

2261    public void setSeriesCreateEntities(int series, Boolean JavaDoc create) {
2262        setSeriesCreateEntities(series, create, true);
2263    }
2264    
2265    /**
2266     * Sets the flag that controls whether entities are created for a series
2267     * and, if requested, sends a {@link RendererChangeEvent} to all registered
2268     * listeners.
2269     *
2270     * @param series the series index.
2271     * @param create the flag (<code>null</code> permitted).
2272     * @param notify notify listeners?
2273     */

2274    public void setSeriesCreateEntities(int series, Boolean JavaDoc create,
2275                                        boolean notify) {
2276        this.createEntitiesList.setBoolean(series, create);
2277        if (notify) {
2278            notifyListeners(new RendererChangeEvent(this));
2279        }
2280    }
2281
2282    /**
2283     * Returns the base visibility for all series.
2284     *
2285     * @return The base visibility.
2286     */

2287    public boolean getBaseCreateEntities() {
2288        return this.baseCreateEntities;
2289    }
2290
2291    /**
2292     * Sets the base flag that controls whether entities are created
2293     * for a series, and sends a {@link RendererChangeEvent}
2294     * to all registered listeners.
2295     *
2296     * @param create the flag.
2297     */

2298    public void setBaseCreateEntities(boolean create) {
2299        // defer argument checking...
2300
setBaseCreateEntities(create, true);
2301    }
2302    
2303    /**
2304     * Sets the base flag that controls whether entities are created and,
2305     * if requested, sends a {@link RendererChangeEvent} to all registered
2306     * listeners.
2307     *
2308     * @param create the visibility.
2309     * @param notify notify listeners?
2310     */

2311    public void setBaseCreateEntities(boolean create, boolean notify) {
2312        this.baseCreateEntities = create;
2313        if (notify) {
2314            notifyListeners(new RendererChangeEvent(this));
2315        }
2316    }
2317
2318    /** The adjacent offset. */
2319    private static final double ADJ = Math.cos(Math.PI / 6.0);
2320    
2321    /** The opposite offset. */
2322    private static final double OPP = Math.sin(Math.PI / 6.0);
2323    
2324    /**
2325     * Calculates the item label anchor point.
2326     *
2327     * @param anchor the anchor.
2328     * @param x the x coordinate.
2329     * @param y the y coordinate.
2330     * @param orientation the plot orientation.
2331     *
2332     * @return The anchor point (never <code>null</code>).
2333     */

2334    protected Point2D JavaDoc calculateLabelAnchorPoint(ItemLabelAnchor anchor,
2335                                                double x,
2336                                                double y,
2337                                                PlotOrientation orientation) {
2338
2339        Point2D JavaDoc result = null;
2340
2341        if (anchor == ItemLabelAnchor.CENTER) {
2342            result = new Point2D.Double JavaDoc(x, y);
2343        }
2344        else if (anchor == ItemLabelAnchor.INSIDE1) {
2345            result = new Point2D.Double JavaDoc(
2346                x + OPP * this.itemLabelAnchorOffset,
2347                y - ADJ * this.itemLabelAnchorOffset
2348            );
2349        }
2350        else if (anchor == ItemLabelAnchor.INSIDE2) {
2351            result = new Point2D.Double JavaDoc(
2352                x + ADJ * this.itemLabelAnchorOffset,
2353                y - OPP * this.itemLabelAnchorOffset
2354            );
2355        }
2356        else if (anchor == ItemLabelAnchor.INSIDE3) {
2357            result = new Point2D.Double JavaDoc(x + this.itemLabelAnchorOffset, y);
2358        }
2359        else if (anchor == ItemLabelAnchor.INSIDE4) {
2360            result = new Point2D.Double JavaDoc(
2361                x + ADJ * this.itemLabelAnchorOffset,
2362                y + OPP * this.itemLabelAnchorOffset
2363            );
2364        }
2365        else if (anchor == ItemLabelAnchor.INSIDE5) {
2366            result = new Point2D.Double JavaDoc(
2367                x + OPP * this.itemLabelAnchorOffset,
2368                y + ADJ * this.itemLabelAnchorOffset
2369            );
2370        }
2371        else if (anchor == ItemLabelAnchor.INSIDE6) {
2372            result = new Point2D.Double JavaDoc(x, y + this.itemLabelAnchorOffset);
2373        }
2374        else if (anchor == ItemLabelAnchor.INSIDE7) {
2375            result = new Point2D.Double JavaDoc(
2376                x - OPP * this.itemLabelAnchorOffset,
2377                y + ADJ * this.itemLabelAnchorOffset
2378            );
2379        }
2380        else if (anchor == ItemLabelAnchor.INSIDE8) {
2381            result = new Point2D.Double JavaDoc(
2382                x - ADJ * this.itemLabelAnchorOffset,
2383                y + OPP * this.itemLabelAnchorOffset
2384            );
2385        }
2386        else if (anchor == ItemLabelAnchor.INSIDE9) {
2387            result = new Point2D.Double JavaDoc(x - this.itemLabelAnchorOffset, y);
2388        }
2389        else if (anchor == ItemLabelAnchor.INSIDE10) {
2390            result = new Point2D.Double JavaDoc(
2391                x - ADJ * this.itemLabelAnchorOffset,
2392                y - OPP * this.itemLabelAnchorOffset
2393            );
2394        }
2395        else if (anchor == ItemLabelAnchor.INSIDE11) {
2396            result = new Point2D.Double JavaDoc(
2397                x - OPP * this.itemLabelAnchorOffset,
2398                y - ADJ * this.itemLabelAnchorOffset
2399            );
2400        }
2401        else if (anchor == ItemLabelAnchor.INSIDE12) {
2402            result = new Point2D.Double JavaDoc(x, y - this.itemLabelAnchorOffset);
2403        }
2404        else if (anchor == ItemLabelAnchor.OUTSIDE1) {
2405            result = new Point2D.Double JavaDoc(
2406                x + 2.0 * OPP * this.itemLabelAnchorOffset,
2407                y - 2.0 * ADJ * this.itemLabelAnchorOffset
2408            );
2409        }
2410        else if (anchor == ItemLabelAnchor.OUTSIDE2) {
2411            result = new Point2D.Double JavaDoc(
2412                x + 2.0 * ADJ * this.itemLabelAnchorOffset,
2413                y - 2.0 * OPP * this.itemLabelAnchorOffset
2414            );
2415        }
2416        else if (anchor == ItemLabelAnchor.OUTSIDE3) {
2417            result = new Point2D.Double JavaDoc(
2418                x + 2.0 * this.itemLabelAnchorOffset, y
2419            );
2420        }
2421        else if (anchor == ItemLabelAnchor.OUTSIDE4) {
2422            result = new Point2D.Double JavaDoc(
2423                x + 2.0 * ADJ * this.itemLabelAnchorOffset,
2424                y + 2.0 * OPP * this.itemLabelAnchorOffset
2425            );
2426        }
2427        else if (anchor == ItemLabelAnchor.OUTSIDE5) {
2428            result = new Point2D.Double JavaDoc(
2429                x + 2.0 * OPP * this.itemLabelAnchorOffset,
2430                y + 2.0 * ADJ * this.itemLabelAnchorOffset
2431            );
2432        }
2433        else if (anchor == ItemLabelAnchor.OUTSIDE6) {
2434            result = new Point2D.Double JavaDoc(
2435                x, y + 2.0 * this.itemLabelAnchorOffset
2436            );
2437        }
2438        else if (anchor == ItemLabelAnchor.OUTSIDE7) {
2439            result = new Point2D.Double JavaDoc(
2440                x - 2.0 * OPP * this.itemLabelAnchorOffset,
2441                y + 2.0 * ADJ * this.itemLabelAnchorOffset
2442            );
2443        }
2444        else if (anchor == ItemLabelAnchor.OUTSIDE8) {
2445            result = new Point2D.Double JavaDoc(
2446                x - 2.0 * ADJ * this.itemLabelAnchorOffset,
2447                y + 2.0 * OPP * this.itemLabelAnchorOffset
2448            );
2449        }
2450        else if (anchor == ItemLabelAnchor.OUTSIDE9) {
2451            result = new Point2D.Double JavaDoc(
2452                x - 2.0 * this.itemLabelAnchorOffset, y
2453            );
2454        }
2455        else if (anchor == ItemLabelAnchor.OUTSIDE10) {
2456            result = new Point2D.Double JavaDoc(
2457                x - 2.0 * ADJ * this.itemLabelAnchorOffset,
2458                y - 2.0 * OPP * this.itemLabelAnchorOffset
2459            );
2460        }
2461        else if (anchor == ItemLabelAnchor.OUTSIDE11) {
2462            result = new Point2D.Double JavaDoc(
2463                x - 2.0 * OPP * this.itemLabelAnchorOffset,
2464                y - 2.0 * ADJ * this.itemLabelAnchorOffset
2465            );
2466        }
2467        else if (anchor == ItemLabelAnchor.OUTSIDE12) {
2468            result = new Point2D.Double JavaDoc(
2469                x, y - 2.0 * this.itemLabelAnchorOffset
2470            );
2471        }
2472
2473        return result;
2474
2475    }
2476    
2477    /**
2478     * Registers an object to receive notification of changes to the renderer.
2479     *
2480     * @param listener the listener (<code>null</code> not permitted).
2481     */

2482    public void addChangeListener(RendererChangeListener listener) {
2483        if (listener == null) {
2484            throw new IllegalArgumentException JavaDoc("Null 'listener' argument.");
2485        }
2486        this.listenerList.add(RendererChangeListener.class, listener);
2487    }
2488
2489    /**
2490     * Deregisters an object so that it no longer receives
2491     * notification of changes to the renderer.
2492     *
2493     * @param listener the object (<code>null</code> not permitted).
2494     */

2495    public void removeChangeListener(RendererChangeListener listener) {
2496        if (listener == null) {
2497            throw new IllegalArgumentException JavaDoc("Null 'listener' argument.");
2498        }
2499        this.listenerList.remove(RendererChangeListener.class, listener);
2500    }
2501
2502    /**
2503     * Returns <code>true</code> if the specified object is registered with
2504     * the dataset as a listener. Most applications won't need to call this
2505     * method, it exists mainly for use by unit testing code.
2506     *
2507     * @param listener the listener.
2508     *
2509     * @return A boolean.
2510     */

2511    public boolean hasListener(EventListener JavaDoc listener) {
2512        List JavaDoc list = Arrays.asList(this.listenerList.getListenerList());
2513        return list.contains(listener);
2514    }
2515    
2516    /**
2517     * Notifies all registered listeners that the renderer has been modified.
2518     *
2519     * @param event information about the change event.
2520     */

2521    public void notifyListeners(RendererChangeEvent event) {
2522
2523        Object JavaDoc[] ls = this.listenerList.getListenerList();
2524        for (int i = ls.length - 2; i >= 0; i -= 2) {
2525            if (ls[i] == RendererChangeListener.class) {
2526                ((RendererChangeListener) ls[i + 1]).rendererChanged(event);
2527            }
2528        }
2529
2530    }
2531
2532    /**
2533     * Tests this renderer for equality with another object.
2534     *
2535     * @param obj the object.
2536     *
2537     * @return <code>true</code> or <code>false</code>.
2538     */

2539    public boolean equals(Object JavaDoc obj) {
2540
2541        if (obj == this) {
2542            return true;
2543        }
2544        if (!(obj instanceof AbstractRenderer)) {
2545            return false;
2546        }
2547        
2548        AbstractRenderer that = (AbstractRenderer) obj;
2549        if (!ObjectUtilities.equal(this.paint, that.paint)) {
2550            return false;
2551        }
2552
2553        if (!ObjectUtilities.equal(this.paintList, that.paintList)) {
2554            return false;
2555        }
2556        if (!ObjectUtilities.equal(this.basePaint, that.basePaint)) {
2557            return false;
2558        }
2559        if (!ObjectUtilities.equal(this.fillPaint, that.fillPaint)) {
2560            return false;
2561        }
2562        if (!ObjectUtilities.equal(this.fillPaintList, that.fillPaintList)) {
2563            return false;
2564        }
2565        if (!ObjectUtilities.equal(this.baseFillPaint, that.baseFillPaint)) {
2566            return false;
2567        }
2568        if (!ObjectUtilities.equal(this.outlinePaint, that.outlinePaint)) {
2569            return false;
2570        }
2571        if (!ObjectUtilities.equal(this.outlinePaintList,
2572                that.outlinePaintList)) {
2573            return false;
2574        }
2575        if (!ObjectUtilities.equal(this.baseOutlinePaint,
2576                that.baseOutlinePaint)) {
2577            return false;
2578        }
2579        if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
2580            return false;
2581        }
2582        if (!ObjectUtilities.equal(this.strokeList, that.strokeList)) {
2583            return false;
2584        }
2585        if (!ObjectUtilities.equal(this.baseStroke, that.baseStroke)) {
2586            return false;
2587        }
2588        if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {
2589            return false;
2590        }
2591        if (!ObjectUtilities.equal(
2592            this.outlineStrokeList, that.outlineStrokeList
2593        )) {
2594            return false;
2595        }
2596        if (!ObjectUtilities.equal(
2597            this.baseOutlineStroke, that.baseOutlineStroke)
2598        ) {
2599            return false;
2600        }
2601        if (!ObjectUtilities.equal(this.shape, that.shape)) {
2602            return false;
2603        }
2604        if (!ObjectUtilities.equal(this.shapeList, that.shapeList)) {
2605            return false;
2606        }
2607        if (!ObjectUtilities.equal(this.baseShape, that.baseShape)) {
2608            return false;
2609        }
2610        if (!ObjectUtilities.equal(
2611            this.itemLabelsVisible, that.itemLabelsVisible
2612        )) {
2613            return false;
2614        }
2615        if (!ObjectUtilities.equal(
2616            this.itemLabelsVisibleList, that.itemLabelsVisibleList)
2617        ) {
2618            return false;
2619        }
2620        if (!ObjectUtilities.equal(
2621            this.baseItemLabelsVisible, that.baseItemLabelsVisible
2622        )) {
2623            return false;
2624        }
2625        if (!ObjectUtilities.equal(this.itemLabelFont, that.itemLabelFont)) {
2626            return false;
2627        }
2628        if (!ObjectUtilities.equal(
2629            this.itemLabelFontList, that.itemLabelFontList
2630        )) {
2631            return false;
2632        }
2633        if (!ObjectUtilities.equal(
2634            this.baseItemLabelFont, that.baseItemLabelFont
2635        )) {
2636            return false;
2637        }
2638 
2639        if (!ObjectUtilities.equal(this.itemLabelPaint, that.itemLabelPaint)) {
2640            return false;
2641        }
2642        if (!ObjectUtilities.equal(
2643            this.itemLabelPaintList, that.itemLabelPaintList
2644        )) {
2645            return false;
2646        }
2647        if (!ObjectUtilities.equal(
2648            this.baseItemLabelPaint, that.baseItemLabelPaint
2649        )) {
2650            return false;
2651        }
2652
2653        if (!ObjectUtilities.equal(
2654                this.positiveItemLabelPosition, that.positiveItemLabelPosition
2655            )) {
2656            return false;
2657        }
2658        if (!ObjectUtilities.equal(
2659                this.positiveItemLabelPositionList,
2660                that.positiveItemLabelPositionList
2661            )) {
2662            return false;
2663        }
2664        if (!ObjectUtilities.equal(
2665                this.basePositiveItemLabelPosition,
2666                that.basePositiveItemLabelPosition
2667            )) {
2668            return false;
2669        }
2670
2671        if (!ObjectUtilities.equal(
2672                this.negativeItemLabelPosition, that.negativeItemLabelPosition
2673            )) {
2674            return false;
2675        }
2676        if (!ObjectUtilities.equal(
2677                this.negativeItemLabelPositionList,
2678                that.negativeItemLabelPositionList
2679            )) {
2680            return false;
2681        }
2682        if (!ObjectUtilities.equal(
2683                this.baseNegativeItemLabelPosition,
2684                that.baseNegativeItemLabelPosition
2685            )) {
2686            return false;
2687        }
2688        if (this.itemLabelAnchorOffset != that.itemLabelAnchorOffset) {
2689            return false;
2690        }
2691
2692        return true;
2693
2694    }
2695    
2696    /**
2697     * Returns a hashcode for the renderer.
2698     *
2699     * @return The hashcode.
2700     */

2701    public int hashCode() {
2702        int result = 193;
2703        result = 37 * result + ObjectUtilities.hashCode(this.stroke);
2704        result = 37 * result + ObjectUtilities.hashCode(this.baseStroke);
2705        result = 37 * result + ObjectUtilities.hashCode(this.outlineStroke);
2706        result = 37 * result + ObjectUtilities.hashCode(this.baseOutlineStroke);
2707        return result;
2708    }
2709    
2710    /**
2711     * Returns an independent copy of the renderer.
2712     *
2713     * @return A clone.
2714     *
2715     * @throws CloneNotSupportedException if some component of the renderer
2716     * does not support cloning.
2717     */

2718    protected Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
2719        AbstractRenderer clone = (AbstractRenderer) super.clone();
2720        
2721        // 'paint' : immutable, no need to clone reference
2722
if (this.paintList != null) {
2723            clone.paintList = (PaintList) this.paintList.clone();
2724        }
2725        // 'basePaint' : immutable, no need to clone reference
2726

2727        if (this.fillPaintList != null) {
2728            clone.fillPaintList = (PaintList) this.fillPaintList.clone();
2729        }
2730        // 'outlinePaint' : immutable, no need to clone reference
2731
if (this.outlinePaintList != null) {
2732            clone.outlinePaintList = (PaintList) this.outlinePaintList.clone();
2733        }
2734        // 'baseOutlinePaint' : immutable, no need to clone reference
2735

2736        // 'stroke' : immutable, no need to clone reference
2737
if (this.strokeList != null) {
2738            clone.strokeList = (StrokeList) this.strokeList.clone();
2739        }
2740        // 'baseStroke' : immutable, no need to clone reference
2741

2742        // 'outlineStroke' : immutable, no need to clone reference
2743
if (this.outlineStrokeList != null) {
2744            clone.outlineStrokeList
2745                = (StrokeList) this.outlineStrokeList.clone();
2746        }
2747        // 'baseOutlineStroke' : immutable, no need to clone reference
2748

2749        if (this.shape != null) {
2750            clone.shape = ShapeUtilities.clone(this.shape);
2751        }
2752        if (this.baseShape != null) {
2753            clone.baseShape = ShapeUtilities.clone(this.baseShape);
2754        }
2755        
2756        // 'itemLabelsVisible' : immutable, no need to clone reference
2757
if (this.itemLabelsVisibleList != null) {
2758            clone.itemLabelsVisibleList
2759                = (BooleanList) this.itemLabelsVisibleList.clone();
2760        }
2761        // 'basePaint' : immutable, no need to clone reference
2762

2763        // 'itemLabelFont' : immutable, no need to clone reference
2764
if (this.itemLabelFontList != null) {
2765            clone.itemLabelFontList
2766                = (ObjectList) this.itemLabelFontList.clone();
2767        }
2768        // 'baseItemLabelFont' : immutable, no need to clone reference
2769

2770        // 'itemLabelPaint' : immutable, no need to clone reference
2771
if (this.itemLabelPaintList != null) {
2772            clone.itemLabelPaintList
2773                = (PaintList) this.itemLabelPaintList.clone();
2774        }
2775        // 'baseItemLabelPaint' : immutable, no need to clone reference
2776

2777        // 'postiveItemLabelAnchor' : immutable, no need to clone reference
2778
if (this.positiveItemLabelPositionList != null) {
2779            clone.positiveItemLabelPositionList
2780                = (ObjectList) this.positiveItemLabelPositionList.clone();
2781        }
2782        // 'baseItemLabelAnchor' : immutable, no need to clone reference
2783

2784        // 'negativeItemLabelAnchor' : immutable, no need to clone reference
2785
if (this.negativeItemLabelPositionList != null) {
2786            clone.negativeItemLabelPositionList
2787                = (ObjectList) this.negativeItemLabelPositionList.clone();
2788        }
2789        // 'baseNegativeItemLabelAnchor' : immutable, no need to clone reference
2790

2791        return clone;
2792    }
2793
2794    /**
2795     * Provides serialization support.
2796     *
2797     * @param stream the output stream.
2798     *
2799     * @throws IOException if there is an I/O error.
2800     */

2801    private void writeObject(ObjectOutputStream JavaDoc stream) throws IOException JavaDoc {
2802
2803        stream.defaultWriteObject();
2804        SerialUtilities.writePaint(this.paint, stream);
2805        SerialUtilities.writePaint(this.basePaint, stream);
2806        SerialUtilities.writePaint(this.fillPaint, stream);
2807        SerialUtilities.writePaint(this.baseFillPaint, stream);
2808        SerialUtilities.writePaint(this.outlinePaint, stream);
2809        SerialUtilities.writePaint(this.baseOutlinePaint, stream);
2810        SerialUtilities.writeStroke(this.stroke, stream);
2811        SerialUtilities.writeStroke(this.baseStroke, stream);
2812        SerialUtilities.writeStroke(this.outlineStroke, stream);
2813        SerialUtilities.writeStroke(this.baseOutlineStroke, stream);
2814        SerialUtilities.writeShape(this.shape, stream);
2815        SerialUtilities.writeShape(this.baseShape, stream);
2816        SerialUtilities.writePaint(this.itemLabelPaint, stream);
2817        SerialUtilities.writePaint(this.baseItemLabelPaint, stream);
2818
2819    }
2820
2821    /**
2822     * Provides serialization support.
2823     *
2824     * @param stream the input stream.
2825     *
2826     * @throws IOException if there is an I/O error.
2827     * @throws ClassNotFoundException if there is a classpath problem.
2828     */

2829    private void readObject(ObjectInputStream JavaDoc stream)
2830        throws IOException JavaDoc, ClassNotFoundException JavaDoc {
2831
2832        stream.defaultReadObject();
2833        this.paint = SerialUtilities.readPaint(stream);
2834        this.basePaint = SerialUtilities.readPaint(stream);
2835        this.fillPaint = SerialUtilities.readPaint(stream);
2836        this.baseFillPaint = SerialUtilities.readPaint(stream);
2837        this.outlinePaint = SerialUtilities.readPaint(stream);
2838        this.baseOutlinePaint = SerialUtilities.readPaint(stream);
2839        this.stroke = SerialUtilities.readStroke(stream);
2840        this.baseStroke = SerialUtilities.readStroke(stream);
2841        this.outlineStroke = SerialUtilities.readStroke(stream);
2842        this.baseOutlineStroke = SerialUtilities.readStroke(stream);
2843        this.shape = SerialUtilities.readShape(stream);
2844        this.baseShape = SerialUtilities.readShape(stream);
2845        this.itemLabelPaint = SerialUtilities.readPaint(stream);
2846        this.baseItemLabelPaint = SerialUtilities.readPaint(stream);
2847        
2848        // listeners are not restored automatically, but storage must be
2849
// provided...
2850
this.listenerList = new EventListenerList JavaDoc();
2851
2852    }
2853
2854}
2855
Popular Tags