KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > charts > base > JRBaseCandlestickPlot


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.base;
29
30 import java.awt.Color JavaDoc;
31
32 import net.sf.jasperreports.charts.JRCandlestickPlot;
33 import net.sf.jasperreports.engine.JRChartPlot;
34 import net.sf.jasperreports.engine.JRConstants;
35 import net.sf.jasperreports.engine.JRExpression;
36 import net.sf.jasperreports.engine.JRExpressionCollector;
37 import net.sf.jasperreports.engine.JRFont;
38 import net.sf.jasperreports.engine.base.JRBaseChartPlot;
39 import net.sf.jasperreports.engine.base.JRBaseObjectFactory;
40
41
42 /**
43  * @author Ionut Nedelcu (ionutned@users.sourceforge.net)
44  * @version $Id: JRBaseCandlestickPlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
45  */

46 public class JRBaseCandlestickPlot extends JRBaseChartPlot implements JRCandlestickPlot
47 {
48     /**
49      *
50      */

51     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
52
53     protected JRExpression timeAxisLabelExpression = null;
54     protected JRFont timeAxisLabelFont = null;
55     protected Color JavaDoc timeAxisLabelColor = null;
56     protected JRFont timeAxisTickLabelFont = null;
57     protected Color JavaDoc timeAxisTickLabelColor = null;
58     protected String JavaDoc timeAxisTickLabelMask = null;
59     protected Color JavaDoc timeAxisLineColor = null;
60
61     protected JRExpression valueAxisLabelExpression = null;
62     protected JRFont valueAxisLabelFont = null;
63     protected Color JavaDoc valueAxisLabelColor = null;
64     protected JRFont valueAxisTickLabelFont = null;
65     protected Color JavaDoc valueAxisTickLabelColor = null;
66     protected String JavaDoc valueAxisTickLabelMask = null;
67     protected Color JavaDoc valueAxisLineColor = null;
68
69     protected boolean isShowVolume = true;
70
71
72     /**
73      *
74      */

75     protected JRBaseCandlestickPlot(JRChartPlot candlestickPlot)
76     {
77         super(candlestickPlot);
78     }
79
80
81     /**
82      *
83      */

84     public JRBaseCandlestickPlot(JRCandlestickPlot candlestickPlot, JRBaseObjectFactory factory)
85     {
86         super(candlestickPlot, factory);
87
88         isShowVolume = candlestickPlot.isShowVolume();
89
90         timeAxisLabelExpression = factory.getExpression( candlestickPlot.getTimeAxisLabelExpression() );
91         timeAxisLabelFont = factory.getFont(candlestickPlot.getTimeAxisLabelFont());
92         timeAxisLabelColor = candlestickPlot.getTimeAxisLabelColor();
93         timeAxisTickLabelFont = factory.getFont(candlestickPlot.getTimeAxisTickLabelFont());
94         timeAxisTickLabelColor = candlestickPlot.getTimeAxisTickLabelColor();
95         timeAxisTickLabelMask = candlestickPlot.getTimeAxisTickLabelMask();
96         timeAxisLineColor = candlestickPlot.getTimeAxisLineColor();
97         
98         valueAxisLabelExpression = factory.getExpression( candlestickPlot.getValueAxisLabelExpression() );
99         valueAxisLabelFont = factory.getFont(candlestickPlot.getValueAxisLabelFont());
100         valueAxisLabelColor = candlestickPlot.getValueAxisLabelColor();
101         valueAxisTickLabelFont = factory.getFont(candlestickPlot.getValueAxisTickLabelFont());
102         valueAxisTickLabelColor = candlestickPlot.getValueAxisTickLabelColor();
103         valueAxisTickLabelMask = candlestickPlot.getValueAxisTickLabelMask();
104         valueAxisLineColor = candlestickPlot.getValueAxisTickLabelColor();
105     }
106
107
108     /**
109      *
110      */

111     public JRExpression getTimeAxisLabelExpression(){
112         return timeAxisLabelExpression;
113     }
114     
115     /**
116      *
117      */

118     public JRFont getTimeAxisLabelFont()
119     {
120         return timeAxisLabelFont;
121     }
122     
123     /**
124      *
125      */

126     public Color JavaDoc getTimeAxisLabelColor()
127     {
128         return timeAxisLabelColor;
129     }
130     
131     /**
132      *
133      */

134     public JRFont getTimeAxisTickLabelFont()
135     {
136         return timeAxisTickLabelFont;
137     }
138     
139     /**
140      *
141      */

142     public Color JavaDoc getTimeAxisTickLabelColor()
143     {
144         return timeAxisTickLabelColor;
145     }
146
147     /**
148      *
149      */

150     public String JavaDoc getTimeAxisTickLabelMask()
151     {
152         return timeAxisTickLabelMask;
153     }
154
155     /**
156      *
157      */

158     public Color JavaDoc getTimeAxisLineColor()
159     {
160         return timeAxisLineColor;
161     }
162
163     /**
164      *
165      */

166     public JRExpression getValueAxisLabelExpression(){
167         return valueAxisLabelExpression;
168     }
169
170     /**
171      *
172      */

173     public JRFont getValueAxisLabelFont()
174     {
175         return valueAxisLabelFont;
176     }
177     
178     /**
179      *
180      */

181     public Color JavaDoc getValueAxisLabelColor()
182     {
183         return valueAxisLabelColor;
184     }
185     
186     /**
187      *
188      */

189     public JRFont getValueAxisTickLabelFont()
190     {
191         return valueAxisTickLabelFont;
192     }
193     
194     /**
195      *
196      */

197     public Color JavaDoc getValueAxisTickLabelColor()
198     {
199         return valueAxisTickLabelColor;
200     }
201
202     /**
203      *
204      */

205     public String JavaDoc getValueAxisTickLabelMask()
206     {
207         return valueAxisTickLabelMask;
208     }
209
210     /**
211      *
212      */

213     public Color JavaDoc getValueAxisLineColor()
214     {
215         return valueAxisLineColor;
216     }
217         
218     /**
219      *
220      */

221     public boolean isShowVolume()
222     {
223         return isShowVolume;
224     }
225
226
227     /**
228      *
229      */

230     public void setShowVolume(boolean ShowVolume)
231     {
232         isShowVolume = ShowVolume;
233     }
234
235     /**
236      *
237      */

238     public void collectExpressions(JRExpressionCollector collector)
239     {
240         collector.collect(this);
241     }
242
243 }
244
Popular Tags