KickJava   Java API By Example, From Geeks To Geeks.

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


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.JRScatterPlot;
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 Teodor Danciu (teodord@users.sourceforge.net)
43  * @version $Id: JRBaseScatterPlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
44  */

45 public class JRBaseScatterPlot extends JRBaseChartPlot implements JRScatterPlot {
46     
47     private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
48     
49     protected JRExpression xAxisLabelExpression = null;
50     protected JRFont xAxisLabelFont = null;
51     protected Color JavaDoc xAxisLabelColor = null;
52     protected JRFont xAxisTickLabelFont = null;
53     protected Color JavaDoc xAxisTickLabelColor = null;
54     protected String JavaDoc xAxisTickLabelMask = null;
55     protected Color JavaDoc xAxisLineColor = null;
56
57     protected JRExpression yAxisLabelExpression = null;
58     protected JRFont yAxisLabelFont = null;
59     protected Color JavaDoc yAxisLabelColor = null;
60     protected JRFont yAxisTickLabelFont = null;
61     protected Color JavaDoc yAxisTickLabelColor = null;
62     protected String JavaDoc yAxisTickLabelMask = null;
63     protected Color JavaDoc yAxisLineColor = null;
64     
65     boolean isShowShapes = true;
66     boolean isShowLines = true;
67     
68     
69     /**
70      *
71      */

72     public JRBaseScatterPlot( JRChartPlot scattedPlot){
73         super( scattedPlot);
74     }
75
76     /**
77      *
78      */

79     public JRBaseScatterPlot( JRScatterPlot scattedPlot, JRBaseObjectFactory factory ){
80         super( scattedPlot, factory );
81         
82         isShowShapes = scattedPlot.isShowShapes();
83         isShowLines = scattedPlot.isShowLines();
84         
85         xAxisLabelExpression = factory.getExpression( scattedPlot.getXAxisLabelExpression() );
86         xAxisLabelFont = factory.getFont(scattedPlot.getXAxisLabelFont());
87         xAxisLabelColor = scattedPlot.getXAxisLabelColor();
88         xAxisTickLabelFont = factory.getFont(scattedPlot.getXAxisTickLabelFont());
89         xAxisTickLabelColor = scattedPlot.getXAxisTickLabelColor();
90         xAxisTickLabelMask = scattedPlot.getXAxisTickLabelMask();
91         xAxisLineColor = scattedPlot.getXAxisLineColor();
92         
93         yAxisLabelExpression = factory.getExpression( scattedPlot.getYAxisLabelExpression() );
94         yAxisLabelFont = factory.getFont(scattedPlot.getYAxisLabelFont());
95         yAxisLabelColor = scattedPlot.getYAxisLabelColor();
96         yAxisTickLabelFont = factory.getFont(scattedPlot.getYAxisTickLabelFont());
97         yAxisTickLabelColor = scattedPlot.getYAxisTickLabelColor();
98         yAxisTickLabelMask = scattedPlot.getYAxisTickLabelMask();
99         yAxisLineColor = scattedPlot.getYAxisLineColor();
100     }
101     
102     /**
103      *
104      */

105     public JRExpression getXAxisLabelExpression(){
106         return xAxisLabelExpression;
107     }
108     
109     /**
110      *
111      */

112     public JRFont getXAxisLabelFont()
113     {
114         return xAxisLabelFont;
115     }
116     
117     /**
118      *
119      */

120     public Color JavaDoc getXAxisLabelColor()
121     {
122         return xAxisLabelColor;
123     }
124         
125     /**
126      *
127      */

128     public JRFont getXAxisTickLabelFont()
129     {
130         return xAxisTickLabelFont;
131     }
132     
133     /**
134      *
135      */

136     public Color JavaDoc getXAxisTickLabelColor()
137     {
138         return xAxisTickLabelColor;
139     }
140     
141     /**
142      *
143      */

144     public String JavaDoc getXAxisTickLabelMask()
145     {
146         return xAxisTickLabelMask;
147     }
148     
149     /**
150      *
151      */

152     public Color JavaDoc getXAxisLineColor()
153     {
154         return xAxisLineColor;
155     }
156     
157     /**
158      *
159      */

160     public JRExpression getYAxisLabelExpression() {
161         return yAxisLabelExpression;
162     }
163     
164     /**
165      *
166      */

167     public JRFont getYAxisLabelFont()
168     {
169         return yAxisLabelFont;
170     }
171     
172     /**
173      *
174      */

175     public Color JavaDoc getYAxisLabelColor()
176     {
177         return yAxisLabelColor;
178     }
179     
180     /**
181      *
182      */

183     public JRFont getYAxisTickLabelFont()
184     {
185         return yAxisTickLabelFont;
186     }
187     
188     /**
189      *
190      */

191     public Color JavaDoc getYAxisTickLabelColor()
192     {
193         return yAxisTickLabelColor;
194     }
195     
196     /**
197      *
198      */

199     public String JavaDoc getYAxisTickLabelMask()
200     {
201         return yAxisTickLabelMask;
202     }
203
204     /**
205      *
206      */

207     public Color JavaDoc getYAxisLineColor()
208     {
209         return yAxisLineColor;
210     }
211     
212     /**
213      *
214      */

215     public boolean isShowShapes(){
216         return isShowShapes;
217     }
218     
219     /**
220      *
221      */

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

229     public void setShowShapes( boolean value ){
230         this.isShowShapes = value;
231     }
232     
233     /**
234      *
235      */

236     public void setShowLines( boolean value ){
237         this.isShowLines = value;
238     }
239
240     /**
241      *
242      */

243     public void collectExpressions(JRExpressionCollector collector)
244     {
245         collector.collect(this);
246     }
247
248 }
249
Popular Tags