KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > data > general > Dataset


1 /* ===========================================================
2  * JFreeChart : a free chart library for the Java(tm) platform
3  * ===========================================================
4  *
5  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jfreechart/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * ------------
28  * Dataset.java
29  * ------------
30  * (C) Copyright 2000-2005, by Object Refinery Limited.
31  *
32  * Original Author: David Gilbert (for Object Refinery Limited);
33  * Contributor(s): -;
34  *
35  * $Id: Dataset.java,v 1.3.2.1 2005/10/25 21:32:29 mungady Exp $
36  *
37  * Changes (from 18-Sep-2001)
38  * --------------------------
39  * 18-Sep-2001 : Added standard header and fixed DOS encoding problem (DG);
40  * 15-Oct-2001 : Moved to a new package (com.jrefinery.data.*) (DG);
41  * 22-Oct-2001 : Changed name to Dataset.java (DG);
42  * 17-Nov-2001 : Added getLegendItemCount() and getLegendItemLabels() methods,
43  * created SeriesDataset interface and transferred series related
44  * methods out (DG);
45  * 22-Jan-2002 : Reconsidered (and removed) the getLegendItemCount() and
46  * getLegendItemLabels() methods...leave this to client code (DG);
47  * 27-Sep-2002 : Added get/setDatasetGroup() methods (DG);
48  * 10-Jan-2003 : Updated Javadocs (DG);
49  *
50  */

51
52 package org.jfree.data.general;
53
54 /**
55  * The base interface for data sets.
56  * <P>
57  * All datasets are required to support the {@link DatasetChangeEvent}
58  * mechanism by allowing listeners to register and receive notification of any
59  * changes to the dataset.
60  * <P>
61  * In addition, all datasets must belong to one (and only one)
62  * {@link DatasetGroup}. The group object maintains a reader-writer lock
63  * which provides synchronised access to the datasets in multi-threaded code.
64  */

65 public interface Dataset {
66
67     /**
68      * Registers an object for notification of changes to the dataset.
69      *
70      * @param listener the object to register.
71      */

72     public void addChangeListener(DatasetChangeListener listener);
73
74     /**
75      * Deregisters an object for notification of changes to the dataset.
76      *
77      * @param listener the object to deregister.
78      */

79     public void removeChangeListener(DatasetChangeListener listener);
80
81     /**
82      * Returns the dataset group.
83      *
84      * @return The dataset group.
85      */

86     public DatasetGroup getGroup();
87
88     /**
89      * Sets the dataset group.
90      *
91      * @param group the dataset group.
92      */

93     public void setGroup(DatasetGroup group);
94
95 }
96
Popular Tags