KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > charts > design > JRDesignThermometerPlot


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.design;
29
30 import net.sf.jasperreports.charts.JRDataRange;
31 import net.sf.jasperreports.charts.JRValueDisplay;
32 import net.sf.jasperreports.charts.base.JRBaseThermometerPlot;
33 import net.sf.jasperreports.engine.JRChartPlot;
34 import net.sf.jasperreports.engine.JRConstants;
35
36 import java.awt.Color JavaDoc;
37
38 /**
39  * The layout options of a thermometer chart.
40  *
41  * @author Barry Klawans (bklawans@users.sourceforge.net)
42  * @version $Id: JRDesignThermometerPlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
43  */

44 public class JRDesignThermometerPlot extends JRBaseThermometerPlot
45 {
46
47
48     /**
49      *
50      */

51     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
52
53     
54     /**
55      * Constructs a new plot that is a copy of an existing one.
56      *
57      * @param thermoPlot the plot to copy
58      */

59     public JRDesignThermometerPlot(JRChartPlot thermoPlot)
60     {
61         super(thermoPlot);
62     }
63     
64     /**
65      * Sets the range of values that can be displayed by this thermometer.
66      * Specifies the upper and lower bounds of the display area of the meter.
67      *
68      * @param dataRange the range of values to display
69      */

70     public void setDataRange(JRDataRange dataRange)
71     {
72         this.dataRange = dataRange;
73     }
74
75     /**
76      * Sets the formatting option for the textual display of the
77      * value.
78      *
79      * @param valueDisplay the value display formatting options
80      */

81     public void setValueDisplay(JRValueDisplay valueDisplay)
82     {
83         this.valueDisplay = valueDisplay;
84     }
85     
86         
87     /**
88      * Turns the display of value lines on and off.
89      *
90      * @param showValueLines <code>true</code> to turn value lines on,
91      * <code>false</code> to disable them
92      */

93     public void setShowValueLines(boolean showValueLines)
94     {
95         this.showValueLines = showValueLines;
96     }
97         
98     /**
99      * Sets where to show the textual display of the value.
100      *
101      * @param valueLocation where to show the textual display of the value
102      */

103     public void setValueLocation(byte valueLocation)
104     {
105         this.valueLocation = valueLocation;
106     }
107
108     /**
109      * Sets the default color of the mercury in the thermometer. This color
110      * will be used when the value is not in a specified range.
111      *
112      * @param mercuryColor the default color of the mercury
113      */

114     public void setMercuryColor(Color JavaDoc mercuryColor)
115     {
116         this.mercuryColor = mercuryColor;
117     }
118     
119     /**
120      * Specifies the low range of the thermometer.
121      *
122      * @param lowRange the low range of the thermometer
123      */

124     public void setLowRange(JRDataRange lowRange)
125     {
126         this.lowRange = lowRange;
127     }
128         
129     /**
130      * Specifies the medium range of the thermometer.
131      *
132      * @param mediumRange the medium range of the thermometer
133      */

134     public void setMediumRange(JRDataRange mediumRange)
135     {
136         this.mediumRange = mediumRange;
137     }
138         
139     /**
140      * Specifies the high range of the thermometer.
141      *
142      * @param highRange the high range of the thermometer
143      */

144     public void setHighRange(JRDataRange highRange)
145     {
146         this.highRange = highRange;
147     }
148 }
149
Popular Tags