KickJava   Java API By Example, From Geeks To Geeks.

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


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.JRHighLowDataset;
31 import net.sf.jasperreports.engine.JRChartDataset;
32 import net.sf.jasperreports.engine.JRConstants;
33 import net.sf.jasperreports.engine.JRExpression;
34 import net.sf.jasperreports.engine.JRExpressionCollector;
35 import net.sf.jasperreports.engine.JRHyperlink;
36 import net.sf.jasperreports.engine.design.JRDesignChartDataset;
37 import net.sf.jasperreports.engine.design.JRVerifier;
38
39
40 /**
41  * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
42  * @version $Id: JRDesignHighLowDataset.java 1364 2006-08-31 18:13:20 +0300 (Thu, 31 Aug 2006) lucianc $
43  */

44 public class JRDesignHighLowDataset extends JRDesignChartDataset implements JRHighLowDataset
45 {
46
47     /**
48      *
49      */

50     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
51
52     protected JRExpression seriesExpression;
53     protected JRExpression dateExpression;
54     protected JRExpression highExpression;
55     protected JRExpression lowExpression;
56     protected JRExpression openExpression;
57     protected JRExpression closeExpression;
58     protected JRExpression volumeExpression;
59     private JRHyperlink itemHyperlink;
60
61
62     /**
63      *
64      */

65     public JRDesignHighLowDataset(JRChartDataset dataset)
66     {
67         super(dataset);
68     }
69
70
71     public JRExpression getSeriesExpression()
72     {
73         return seriesExpression;
74     }
75
76
77     public void setSeriesExpression(JRExpression seriesExpression)
78     {
79         this.seriesExpression = seriesExpression;
80     }
81
82     public JRExpression getDateExpression()
83     {
84         return dateExpression;
85     }
86
87
88     public void setDateExpression(JRExpression dateExpression)
89     {
90         this.dateExpression = dateExpression;
91     }
92
93
94     public JRExpression getHighExpression()
95     {
96         return highExpression;
97     }
98
99
100     public void setHighExpression(JRExpression highExpression)
101     {
102         this.highExpression = highExpression;
103     }
104
105
106     public JRExpression getLowExpression()
107     {
108         return lowExpression;
109     }
110
111
112     public void setLowExpression(JRExpression lowExpression)
113     {
114         this.lowExpression = lowExpression;
115     }
116
117
118     public JRExpression getOpenExpression()
119     {
120         return openExpression;
121     }
122
123
124     public void setOpenExpression(JRExpression openExpression)
125     {
126         this.openExpression = openExpression;
127     }
128
129
130     public JRExpression getCloseExpression()
131     {
132         return closeExpression;
133     }
134
135
136     public void setCloseExpression(JRExpression closeExpression)
137     {
138         this.closeExpression = closeExpression;
139     }
140
141
142     public JRExpression getVolumeExpression()
143     {
144         return volumeExpression;
145     }
146
147
148     public void setVolumeExpression(JRExpression volumeExpression)
149     {
150         this.volumeExpression = volumeExpression;
151     }
152
153     /**
154      *
155      */

156     public byte getDatasetType() {
157         return JRChartDataset.HIGHLOW_DATASET;
158     }
159
160
161     /**
162      *
163      */

164     public void collectExpressions(JRExpressionCollector collector)
165     {
166         collector.collect(this);
167     }
168
169     
170     public JRHyperlink getItemHyperlink()
171     {
172         return itemHyperlink;
173     }
174
175
176     /**
177      * Sets the hyperlink specification for chart items.
178      *
179      * @param itemHyperlink the hyperlink specification
180      * @see #getItemHyperlink()
181      */

182     public void setItemHyperlink(JRHyperlink itemHyperlink)
183     {
184         this.itemHyperlink = itemHyperlink;
185     }
186
187
188     public void validate(JRVerifier verifier)
189     {
190         verifier.verify(this);
191     }
192
193
194 }
195
196
Popular Tags