KickJava   Java API By Example, From Geeks To Geeks.

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


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  * MeterDataset.java
24  * -----------------
25  * (C) Copyright 2002, 2003, by Hari and Contributors.
26  *
27  * Original Author: Hari (ourhari@hotmail.com);
28  * Contributor(s): David Gilbert (for Object Refinery Limited);
29  *
30  * $Id: MeterDataset.java,v 1.2 2003/06/04 22:58:28 mungady Exp $
31  *
32  * Changes
33  * -------
34  * 02-Apr-2002 : Version 1, based on code contributed by Hari (DG);
35  * 16-Apr-2002 : Updated version from Hari (DG);
36  * 23-Aug-2002 : Updated Javadoc comments (DG);
37  * 23-Oct-2002 : Now extends the Value interface (DG);
38  *
39  */

40
41 package org.jfree.data;
42
43 /**
44  * A dataset containing a single value within an overall range. In addition, the dataset defines
45  * three subranges: the 'normal' range, the 'warning' range and the 'critical' range.
46  * <P>
47  * This dataset can be used to supply data to meters and gauges. MeterPlot and ThermometerPlot
48  * are the current implementations.
49  *
50  * @author Hari
51  */

52 public interface MeterDataset extends Value, Dataset {
53
54     /** A constant representing the 'normal' level. */
55     public static final int NORMAL_DATA = 0;
56
57     /** A constant representing the 'warning' level. */
58     public static final int WARNING_DATA = 1;
59
60     /** A constant representing the 'critical' level. */
61     public static final int CRITICAL_DATA = 2;
62
63     /** A constant representing the full data range. */
64     public static final int FULL_DATA = 3;
65
66     /**
67      * Returns the lower value in the overall range.
68      *
69      * @return The lower value.
70      */

71     public Number JavaDoc getMinimumValue();
72
73     /**
74      * Returns the upper value in the overall range.
75      *
76      * @return The upper value.
77      */

78     public Number JavaDoc getMaximumValue();
79
80     /**
81      * Returns the lower value in the normal range.
82      *
83      * @return The lower value.
84      */

85     public Number JavaDoc getMinimumNormalValue();
86
87     /**
88      * Returns the upper value in the normal range.
89      *
90      * @return The upper value.
91      */

92     public Number JavaDoc getMaximumNormalValue();
93
94     /**
95      * Returns the lower value in the warning range.
96      *
97      * @return The lower value.
98      */

99     public Number JavaDoc getMinimumWarningValue();
100
101     /**
102      * Returns the upper value in the warning range.
103      *
104      * @return The upper value.
105      */

106     public Number JavaDoc getMaximumWarningValue();
107
108     /**
109      * Returns the lower value in the critical range.
110      *
111      * @return The lower value.
112      */

113     public Number JavaDoc getMinimumCriticalValue();
114
115     /**
116      * Returns the upper value in the critical range.
117      *
118      * @return The upper value.
119      */

120     public Number JavaDoc getMaximumCriticalValue();
121
122     /**
123      * Returns true if the value is valid, and false otherwise.
124      *
125      * @return boolean
126      */

127     public boolean isValueValid();
128
129     /**
130      * Returns a string representing the units on the dial.
131      *
132      * @return the units.
133      */

134     public String JavaDoc getUnits();
135
136     /**
137      * Returns the border type for the data.
138      *
139      * @return The border type.
140      */

141     public int getBorderType();
142
143 }
144
Popular Tags