KickJava   Java API By Example, From Geeks To Geeks.

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


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.JRAreaPlot;
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  * @author Flavius Sana (flavius_sana@users.sourceforge.net)
43  * @version $Id: JRBaseAreaPlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
44  */

45 public class JRBaseAreaPlot extends JRBaseChartPlot implements JRAreaPlot {
46
47     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
48     
49     protected JRExpression categoryAxisLabelExpression = null;
50     protected JRFont categoryAxisLabelFont = null;
51     protected Color JavaDoc categoryAxisLabelColor = null;
52     protected JRFont categoryAxisTickLabelFont = null;
53     protected Color JavaDoc categoryAxisTickLabelColor = null;
54     protected String JavaDoc categoryAxisTickLabelMask = null;
55     protected Color JavaDoc categoryAxisLineColor = null;
56
57     protected JRExpression valueAxisLabelExpression = null;
58     protected JRFont valueAxisLabelFont = null;
59     protected Color JavaDoc valueAxisLabelColor = null;
60     protected JRFont valueAxisTickLabelFont = null;
61     protected Color JavaDoc valueAxisTickLabelColor = null;
62     protected String JavaDoc valueAxisTickLabelMask = null;
63     protected Color JavaDoc valueAxisLineColor = null;
64     
65
66     /**
67      *
68      */

69     public JRBaseAreaPlot( JRChartPlot areaPlot){
70         super( areaPlot);
71     }
72
73
74     /**
75      *
76      */

77     public JRBaseAreaPlot( JRAreaPlot areaPlot, JRBaseObjectFactory factory ){
78         super( areaPlot, factory );
79         
80         categoryAxisLabelExpression = factory.getExpression( areaPlot.getCategoryAxisLabelExpression() );
81         categoryAxisLabelFont = factory.getFont(areaPlot.getCategoryAxisLabelFont());
82         categoryAxisLabelColor = areaPlot.getCategoryAxisLabelColor();
83         categoryAxisTickLabelFont = factory.getFont(areaPlot.getCategoryAxisTickLabelFont());
84         categoryAxisTickLabelColor = areaPlot.getCategoryAxisTickLabelColor();
85         categoryAxisTickLabelMask = areaPlot.getCategoryAxisTickLabelMask();
86         categoryAxisLineColor = areaPlot.getCategoryAxisLineColor();
87         
88         valueAxisLabelExpression = factory.getExpression( areaPlot.getValueAxisLabelExpression() );
89         valueAxisLabelFont = factory.getFont(areaPlot.getValueAxisLabelFont());
90         valueAxisLabelColor = areaPlot.getValueAxisLabelColor();
91         valueAxisTickLabelFont = factory.getFont(areaPlot.getValueAxisTickLabelFont());
92         valueAxisTickLabelColor = areaPlot.getValueAxisTickLabelColor();
93         valueAxisTickLabelMask = areaPlot.getValueAxisTickLabelMask();
94         valueAxisLineColor = areaPlot.getValueAxisLineColor();
95     }
96     
97     /**
98      *
99      */

100     public JRExpression getCategoryAxisLabelExpression(){
101         return categoryAxisLabelExpression;
102     }
103     
104     /**
105      *
106      */

107     public JRFont getCategoryAxisLabelFont()
108     {
109         return categoryAxisLabelFont;
110     }
111     
112     /**
113      *
114      */

115     public Color JavaDoc getCategoryAxisLabelColor()
116     {
117         return categoryAxisLabelColor;
118     }
119     
120     /**
121      *
122      */

123     public JRFont getCategoryAxisTickLabelFont()
124     {
125         return categoryAxisTickLabelFont;
126     }
127     
128     /**
129      *
130      */

131     public Color JavaDoc getCategoryAxisTickLabelColor()
132     {
133         return categoryAxisTickLabelColor;
134     }
135
136     /**
137      *
138      */

139     public String JavaDoc getCategoryAxisTickLabelMask()
140     {
141         return categoryAxisTickLabelMask;
142     }
143
144     /**
145      *
146      */

147     public Color JavaDoc getCategoryAxisLineColor()
148     {
149         return categoryAxisLineColor;
150     }
151         
152     /**
153      *
154      */

155     public JRExpression getValueAxisLabelExpression(){
156         return valueAxisLabelExpression;
157     }
158
159     /**
160      *
161      */

162     public JRFont getValueAxisLabelFont()
163     {
164         return valueAxisLabelFont;
165     }
166     
167     /**
168      *
169      */

170     public Color JavaDoc getValueAxisLabelColor()
171     {
172         return valueAxisLabelColor;
173     }
174     
175     /**
176      *
177      */

178     public JRFont getValueAxisTickLabelFont()
179     {
180         return valueAxisTickLabelFont;
181     }
182     
183     /**
184      *
185      */

186     public Color JavaDoc getValueAxisTickLabelColor()
187     {
188         return valueAxisTickLabelColor;
189     }
190
191     /**
192      *
193      */

194     public String JavaDoc getValueAxisTickLabelMask()
195     {
196         return valueAxisTickLabelMask;
197     }
198
199     /**
200      *
201      */

202     public Color JavaDoc getValueAxisLineColor()
203     {
204         return valueAxisLineColor;
205     }
206     
207     /**
208      *
209      */

210     public void collectExpressions(JRExpressionCollector collector)
211     {
212         collector.collect(this);
213     }
214
215 }
216
Popular Tags