KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > charts > JRThermometerPlot


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * 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,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

28 package net.sf.jasperreports.charts;
29
30 import net.sf.jasperreports.charts.JRDataRange;
31 import net.sf.jasperreports.charts.JRValueDisplay;
32 import net.sf.jasperreports.engine.JRChartPlot;
33
34 import java.awt.Color JavaDoc;
35
36 /**
37  * Represents the display options of a Thermometer chart. A Thermometer chart
38  * consists of the outline of a thermometer, a scale showing the reading of
39  * the thermometer, three optional ranges corresponding to "good", "warning"
40  * and "critical", and the textual display of the value.
41  *
42  * @author Barry Klawans (bklawans@users.sourceforge.net)
43  * @version $Id: JRThermometerPlot.java 1385 2006-09-06 00:29:03 +0300 (Wed, 06 Sep 2006) bklawans $
44  */

45 public interface JRThermometerPlot extends JRChartPlot
46 {
47     /**
48      * The value should not be displayed.
49      */

50     public static final byte LOCATION_NONE = 0;
51     
52     /**
53      * The value should be displayed to the left of the thermometer.
54      */

55     public static final byte LOCATION_LEFT = 1;
56     
57     /**
58      * The value should be displayed to the right of the thermometer.
59      */

60     public static final byte LOCATION_RIGHT = 2;
61     
62     /**
63      * The value should be displayed in the bulb of the thermometer. When
64      * using this option make sure the font is small enough or the value short
65      * enough so the value fits in the bulb.
66      */

67     public static final byte LOCATION_BULB = 3;
68     
69     /**
70      * Returns the range of values displayed by this thermometer. This range
71      * corresponds with the scale on the thermometer.
72      *
73      * @return the range of values displayed by this thermometer
74      */

75     public JRDataRange getDataRange();
76     
77     /**
78      * Returns formatting information for the textual representation of the value.
79      *
80      * @return formatting information for the value
81      */

82     public JRValueDisplay getValueDisplay();
83     
84     /**
85      * Returns whether or not lines are drawn showing the bounds of each defined
86      * range.
87      *
88      * @return <code>true</code> if range bounds are shown, <code>false</code> otherwise
89      */

90     public boolean isShowValueLines();
91     
92     /**
93      * Returns the location where the value of the thermometer will be shown. The
94      * return value will be one of <code>LOCATION_NONE</code>,
95      * <code>LOCATION_LEFT</code>, <code>LOCATION_RIGHT</code> or
96      * <code>LOCATION_BULB</code>.
97      *
98      * @return the location where the value of the thermometer will be shown
99      */

100     public byte getValueLocation();
101     
102     /**
103      * Returns the color of the "mercury" in the thermometer when the value is
104      * not in a defined range.
105      *
106      * @return the default color of the mercury in the thermometer
107      */

108     public Color JavaDoc getMercuryColor();
109     
110     /**
111      * Returns the low range, or <code>null</code> if undefined.
112      *
113      * @return the low range, or <code>null</code> if undefined.
114      */

115     public JRDataRange getLowRange();
116     
117     /**
118      * Returns the medium range, or <code>null</code> if undefined.
119      *
120      * @return the medium range, or <code>null</code> if undefined.
121      */

122     public JRDataRange getMediumRange();
123     
124     /**
125      * Returns the high range, or <code>null</code> if undefined.
126      *
127      * @return the high range, or <code>null</code> if undefined.
128      */

129     public JRDataRange getHighRange();
130 }
131
Popular Tags