KickJava   Java API By Example, From Geeks To Geeks.

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


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.JRBubblePlot;
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 import org.jfree.chart.renderer.xy.XYBubbleRenderer;
42
43 /**
44  * @author Flavius Sana (flavius_sana@users.sourceforge.net)
45  * @version $Id: JRBaseBubblePlot.java 1386 2006-09-06 00:33:02 +0300 (Wed, 06 Sep 2006) bklawans $
46  */

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

73     public JRBaseBubblePlot( JRChartPlot bubblePlot){
74         super( bubblePlot);
75     }
76
77
78     /**
79      *
80      */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

216     public int getScaleType(){
217         return scaleType;
218     }
219     
220     /**
221      *
222      */

223     public void setScaleType( int scaleType ){
224         this.scaleType = scaleType;
225     }
226
227     /**
228      *
229      */

230     public void collectExpressions(JRExpressionCollector collector)
231     {
232         collector.collect(this);
233     }
234
235 }
236
Popular Tags