KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > data > AbstractSeriesDataset


1 /* ======================================
2  * JFreeChart : a free Java chart library
3  * ======================================
4  *
5  * Project Info: http://www.jfree.org/jfreechart/index.html
6  * Project Lead: David Gilbert (david.gilbert@object-refinery.com);
7  *
8  * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
9  *
10  * This library is free software; you can redistribute it and/or modify it under the terms
11  * of the GNU Lesser General Public License as published by the Free Software Foundation;
12  * either version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License along with this
19  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  *
22  * --------------------------
23  * AbstractSeriesDataset.java
24  * --------------------------
25  * (C) Copyright 2001-2003, by Object Refinery Limited.
26  *
27  * Original Author: David Gilbert (for Object Refinery Limited);
28  * Contributor(s): -;
29  *
30  * $Id: AbstractSeriesDataset.java,v 1.3 2003/06/13 15:46:39 mungady Exp $
31  *
32  * Changes
33  * -------
34  * 17-Nov-2001 : Version 1 (DG);
35  * 28-Mar-2002 : Implemented SeriesChangeListener interface (DG);
36  * 04-Oct-2002 : Fixed errors reported by Checkstyle (DG);
37  * 04-Feb-2003 : Removed redundant methods (DG);
38  * 27-Mar-2003 : Implemented Serializable (DG);
39  *
40  */

41
42 package org.jfree.data;
43
44 import java.io.Serializable JavaDoc;
45
46 /**
47  * An abstract implementation of the {@link SeriesDataset} interface, containing a
48  * mechanism for registering change listeners.
49  *
50  * @author David Gilbert
51  */

52 public abstract class AbstractSeriesDataset extends AbstractDataset
53                                             implements SeriesDataset,
54                                                        SeriesChangeListener,
55                                                        Serializable JavaDoc {
56
57     /**
58      * Creates a new dataset.
59      */

60     protected AbstractSeriesDataset() {
61         super();
62     }
63
64     /**
65      * Returns the number of series in the dataset.
66      *
67      * @return the number of series in the dataset.
68      */

69     public abstract int getSeriesCount();
70
71     /**
72      * Returns the name of a series.
73      *
74      * @param series the series (zero-based index).
75      *
76      * @return the series name.
77      */

78     public abstract String JavaDoc getSeriesName(int series);
79
80     /**
81      * Called when a series belonging to the dataset changes.
82      *
83      * @param event information about the change.
84      */

85     public void seriesChanged(SeriesChangeEvent event) {
86         fireDatasetChanged();
87     }
88
89 }
90
Popular Tags