KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > chart > demo > EmptyXYDataset


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  * EmptyXYDataset.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: EmptyXYDataset.java,v 1.2 2003/05/29 15:23:32 mungady Exp $
31  *
32  * Changes
33  * -------
34  * 22-Nov-2001 : Version 1 (DG);
35  * 10-Oct-2002 : Fixed errors reported by Checkstyle (DG);
36  *
37  */

38
39 package org.jfree.chart.demo;
40
41 import org.jfree.data.AbstractSeriesDataset;
42 import org.jfree.data.XYDataset;
43
44 /**
45  * An empty dataset for testing purposes.
46  *
47  * @author David Gilbert
48  */

49 public class EmptyXYDataset extends AbstractSeriesDataset implements XYDataset {
50
51     /**
52      * Default constructor.
53      */

54     public EmptyXYDataset() {
55     }
56
57     /**
58      * Returns the x-value for the specified series and item.
59      *
60      * @param series the series (zero-based index).
61      * @param item the item (zero-based index).
62      *
63      * @return the x-value (always null for this class).
64      */

65     public Number JavaDoc getXValue(int series, int item) {
66         return null;
67     }
68
69     /**
70      * Returns the y-value for the specified series and item.
71      *
72      * @param series the series (zero-based index).
73      * @param item the item (zero-based index).
74      *
75      * @return the y-value (always null for this class).
76      */

77     public Number JavaDoc getYValue(int series, int item) {
78         return null;
79     }
80
81     /**
82      * Returns the number of series in the dataset.
83      *
84      * @return the series count (always zero for this class).
85      */

86     public int getSeriesCount() {
87         return 0;
88     }
89
90     /**
91      * Returns the name of the series.
92      *
93      * @param series the series (zero-based index).
94      *
95      * @return the name of the series (always null in this class).
96      */

97     public String JavaDoc getSeriesName(int series) {
98         return null;
99     }
100
101     /**
102      * Returns the number of items in the specified series.
103      *
104      * @param series the series (zero-based index).
105      *
106      * @return the item count (always zero in this class).
107      */

108     public int getItemCount(int series) {
109         return 0;
110     }
111
112 }
113
Popular Tags