KickJava   Java API By Example, From Geeks To Geeks.

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


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.JRHighLowPlot;
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: JRBaseHighLowPlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
45  */

46 public class JRBaseHighLowPlot extends JRBaseChartPlot implements JRHighLowPlot
47 {
48
49     /**
50      *
51      */

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

77     public JRBaseHighLowPlot(JRChartPlot highLowPlot)
78     {
79         super(highLowPlot);
80     }
81
82
83     /**
84      *
85      */

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

114     public JRExpression getTimeAxisLabelExpression(){
115         return timeAxisLabelExpression;
116     }
117     
118     /**
119      *
120      */

121     public JRFont getTimeAxisLabelFont()
122     {
123         return timeAxisLabelFont;
124     }
125     
126     /**
127      *
128      */

129     public Color JavaDoc getTimeAxisLabelColor()
130     {
131         return timeAxisLabelColor;
132     }
133     
134     
135     /**
136      *
137      */

138     public JRFont getTimeAxisTickLabelFont()
139     {
140         return timeAxisTickLabelFont;
141     }
142     
143     /**
144      *
145      */

146     public Color JavaDoc getTimeAxisTickLabelColor()
147     {
148         return timeAxisTickLabelColor;
149     }
150
151     /**
152      *
153      */

154     public String JavaDoc getTimeAxisTickLabelMask()
155     {
156         return timeAxisTickLabelMask;
157     }
158
159     /**
160      *
161      */

162     public Color JavaDoc getTimeAxisLineColor()
163     {
164         return timeAxisLineColor;
165     }
166     /**
167      *
168      */

169     public JRExpression getValueAxisLabelExpression(){
170         return valueAxisLabelExpression;
171     }
172
173     /**
174      *
175      */

176     public JRFont getValueAxisLabelFont()
177     {
178         return valueAxisLabelFont;
179     }
180     
181     /**
182      *
183      */

184     public Color JavaDoc getValueAxisLabelColor()
185     {
186         return valueAxisLabelColor;
187     }
188     
189     /**
190      *
191      */

192     public JRFont getValueAxisTickLabelFont()
193     {
194         return valueAxisTickLabelFont;
195     }
196     
197     /**
198      *
199      */

200     public Color JavaDoc getValueAxisTickLabelColor()
201     {
202         return valueAxisTickLabelColor;
203     }
204
205     /**
206      *
207      */

208     public String JavaDoc getValueAxisTickLabelMask()
209     {
210         return valueAxisTickLabelMask;
211     }
212
213     /**
214      *
215      */

216     public Color JavaDoc getValueAxisLineColor()
217     {
218         return valueAxisLineColor;
219     }
220         
221     /**
222      *
223      */

224     public boolean isShowOpenTicks()
225     {
226         return isShowOpenTicks;
227     }
228
229
230     /**
231      *
232      */

233     public void setShowOpenTicks(boolean showOpenTicks)
234     {
235         isShowOpenTicks = showOpenTicks;
236     }
237
238
239     /**
240      *
241      */

242     public boolean isShowCloseTicks()
243     {
244         return isShowCloseTicks;
245     }
246
247
248     /**
249      *
250      */

251     public void setShowCloseTicks(boolean showCloseTicks)
252     {
253         isShowCloseTicks = showCloseTicks;
254     }
255
256     /**
257      *
258      */

259     public void collectExpressions(JRExpressionCollector collector)
260     {
261         collector.collect(this);
262     }
263
264 }
265
Popular Tags