KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > laures > cewolf > example > ParamBean


1 /* ================================================================
2  * Cewolf : Chart enabling Web Objects Framework
3  * ================================================================
4  *
5  * Project Info: http://cewolf.sourceforge.net
6  * Project Lead: Guido Laures (guido@laures.de);
7  *
8  * (C) Copyright 2002, by Guido Laures
9  *
10  * This library is free software; you can redistribute it and/or modify it under the terms
11  * of the GNU Lesser General Public License as published by the Free Software Foundation;
12  * either 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, but WITHOUT ANY WARRANTY;
15  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License along with this
19  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */

22
23 package de.laures.cewolf.example;
24
25 import de.laures.cewolf.WebConstants;
26
27 /**
28  * Parameter bean used by the testpage JSP.
29  * @author Guido Laures
30  */

31 public class ParamBean implements java.io.Serializable JavaDoc, WebConstants {
32
33     /** Holds value of property width. */
34     private int width = 300;
35
36     /** Holds value of property height. */
37     private int height = 300;
38
39     /** Holds value of property antialias. */
40     private boolean antialias = true;
41
42     /** Holds value of property title. */
43     private String JavaDoc title = "";
44
45     /** Holds value of property minVal. */
46     private int minVal = -100;
47
48     /** Holds value of property maxVal. */
49     private int maxVal = 100;
50
51     /** Holds value of property colorColor. */
52     private String JavaDoc colorColor = "#FFFFFF";
53
54     /** Holds value of property selectedPaint. */
55     private String JavaDoc paint = "color";
56
57     /** Holds value of property gradientColor1. */
58     private String JavaDoc gradientColor1 = "#FFFFFF";
59
60     /** Holds value of property gradientX1. */
61     private int gradientX1;
62
63     /** Holds value of property gradientX2. */
64     private int gradientX2;
65
66     /** Holds value of property gradientColor2. */
67     private String JavaDoc gradientColor2 = "#FFFFFF";
68
69     /** Holds value of property gradientY2. */
70     private int gradientY2;
71
72     /** Holds value of property gradientY1. */
73     private int gradientY1;
74
75     /** Holds value of property textureImage. */
76     private String JavaDoc textureImage = "";
77
78     /** Holds value of property textureWidth. */
79     private int textureWidth = 50;
80
81     /** Holds value of property textureHeight. */
82     private int textureHeight = 50;
83
84     /** Holds value of property cyclic. */
85     private boolean cyclic;
86
87     /** Holds value of property legend. */
88     private boolean legend;
89
90     /** Holds value of property legendAnchor. */
91     private String JavaDoc legendAnchor = "south";
92
93     /** Holds value of property extraTitle. */
94     private String JavaDoc extraTitle;
95     
96     private String JavaDoc mimeType = MIME_PNG;
97
98     /**
99      * Getter for property width.
100      * @return Value of property width.
101      */

102     public int getWidth() {
103         return this.width;
104     }
105
106     /**
107      * Setter for property width.
108      * @param width New value of property width.
109      */

110     public void setWidth(int width) {
111         this.width = width;
112     }
113
114     /**
115      * Getter for property height.
116      * @return Value of property height.
117      */

118     public int getHeight() {
119         return this.height;
120     }
121
122     /**
123      * Setter for property height.
124      * @param height New value of property height.
125      */

126     public void setHeight(int height) {
127         this.height = height;
128     }
129
130     /**
131      * Setter for property antialias.
132      * @param antialias New value of property antialias.
133      */

134     public void setAntialias(boolean antialias) {
135         // this.antialias = "on".equals(antialias);
136
this.antialias = antialias;
137     }
138
139     public boolean getAntialias() {
140         return antialias;
141     }
142
143     /**
144      * Getter for property title.
145      * @return Value of property title.
146      */

147     public String JavaDoc getTitle() {
148         return this.title;
149     }
150
151     /**
152      * Setter for property title.
153      * @param title New value of property title.
154      */

155     public void setTitle(String JavaDoc title) {
156         this.title = title;
157     }
158
159     /**
160      * Getter for property minVal.
161      * @return Value of property minVal.
162      */

163     public int getMinVal() {
164         return this.minVal;
165     }
166
167     /**
168      * Setter for property minVal.
169      * @param minVal New value of property minVal.
170      */

171     public void setMinVal(int minVal) {
172         this.minVal = minVal;
173     }
174
175     /**
176      * Getter for property maxVal.
177      * @return Value of property maxVal.
178      */

179     public int getMaxVal() {
180         return this.maxVal;
181     }
182
183     /**
184      * Setter for property maxVal.
185      * @param maxVal New value of property maxVal.
186      */

187     public void setMaxVal(int maxVal) {
188         this.maxVal = maxVal;
189     }
190
191     /**
192      * Getter for property colorColor.
193      * @return Value of property colorColor.
194      */

195     public String JavaDoc getColorColor() {
196         return this.colorColor;
197     }
198
199     /**
200      * Setter for property colorColor.
201      * @param colorColor New value of property colorColor.
202      */

203     public void setColorColor(String JavaDoc colorColor) {
204         this.colorColor = colorColor;
205     }
206
207     /**
208      * Getter for property selectedPaint.
209      * @return Value of property selectedPaint.
210      */

211     public String JavaDoc getPaint() {
212         return this.paint;
213     }
214
215     /**
216      * Setter for property selectedPaint.
217      * @param selectedPaint New value of property selectedPaint.
218      */

219     public void setPaint(String JavaDoc selectedPaint) {
220         this.paint = selectedPaint;
221     }
222
223     public boolean isSelectedPaint(String JavaDoc p) {
224         return paint.equalsIgnoreCase(p);
225     }
226
227     /**
228      * Getter for property gradientColor1.
229      * @return Value of property gradientColor1.
230      */

231     public String JavaDoc getGradientColor1() {
232         return this.gradientColor1;
233     }
234
235     /**
236      * Setter for property gradientColor1.
237      * @param gradientColor1 New value of property gradientColor1.
238      */

239     public void setGradientColor1(String JavaDoc gradientColor1) {
240         this.gradientColor1 = gradientColor1;
241     }
242
243     /**
244      * Getter for property gradientX1.
245      * @return Value of property gradientX1.
246      */

247     public int getGradientX1() {
248         return this.gradientX1;
249     }
250
251     /**
252      * Setter for property gradientX1.
253      * @param gradientX1 New value of property gradientX1.
254      */

255     public void setGradientX1(int gradientX1) {
256         this.gradientX1 = gradientX1;
257     }
258
259     /**
260      * Getter for property gradientX2.
261      * @return Value of property gradientX2.
262      */

263     public int getGradientX2() {
264         return this.gradientX2;
265     }
266
267     /**
268      * Setter for property gradientX2.
269      * @param gradientX2 New value of property gradientX2.
270      */

271     public void setGradientX2(int gradientX2) {
272         this.gradientX2 = gradientX2;
273     }
274
275     /**
276      * Getter for property gradientColor2.
277      * @return Value of property gradientColor2.
278      */

279     public String JavaDoc getGradientColor2() {
280         return this.gradientColor2;
281     }
282
283     /**
284      * Setter for property gradientColor2.
285      * @param gradientColor2 New value of property gradientColor2.
286      */

287     public void setGradientColor2(String JavaDoc gradientColor2) {
288         this.gradientColor2 = gradientColor2;
289     }
290
291     /**
292      * Getter for property gradientY2.
293      * @return Value of property gradientY2.
294      */

295     public int getGradientY2() {
296         return this.gradientY2;
297     }
298
299     /**
300      * Setter for property gradientY2.
301      * @param gradientY2 New value of property gradientY2.
302      */

303     public void setGradientY2(int gradientY2) {
304         this.gradientY2 = gradientY2;
305     }
306
307     /**
308      * Getter for property gradientY1.
309      * @return Value of property gradientY1.
310      */

311     public int getGradientY1() {
312         return this.gradientY1;
313     }
314
315     /**
316      * Setter for property gradientY1.
317      * @param gradientY1 New value of property gradientY1.
318      */

319     public void setGradientY1(int gradientY1) {
320         this.gradientY1 = gradientY1;
321     }
322
323     /**
324      * Getter for property textureImage.
325      * @return Value of property textureImage.
326      */

327     public String JavaDoc getTextureImage() {
328         return this.textureImage;
329     }
330
331     /**
332      * Setter for property textureImage.
333      * @param textureImage New value of property textureImage.
334      */

335     public void setTextureImage(String JavaDoc textureImage) {
336         this.textureImage = textureImage;
337     }
338
339     /**
340      * Getter for property textureWidth.
341      * @return Value of property textureWidth.
342      */

343     public int getTextureWidth() {
344         return this.textureWidth;
345     }
346
347     /**
348      * Setter for property textureWidth.
349      * @param textureWidth New value of property textureWidth.
350      */

351     public void setTextureWidth(int textureWidth) {
352         this.textureWidth = textureWidth;
353     }
354
355     /**
356      * Getter for property textureHeight.
357      * @return Value of property textureHeight.
358      */

359     public int getTextureHeight() {
360         return this.textureHeight;
361     }
362
363     /**
364      * Setter for property textureHeight.
365      * @param textureHeight New value of property textureHeight.
366      */

367     public void setTextureHeight(int textureHeight) {
368         this.textureHeight = textureHeight;
369     }
370
371     /**
372      * Getter for property cyclic.
373      * @return Value of property cyclic.
374      */

375     public boolean getCyclic() {
376         return this.cyclic;
377     }
378
379     /**
380      * Setter for property cyclic.
381      * @param cyclic New value of property cyclic.
382      */

383     public void setCyclic(boolean cyclic) {
384         this.cyclic = cyclic;
385     }
386
387     /**
388      * Getter for property legend.
389      * @return Value of property legend.
390      */

391     public boolean isLegend() {
392         return this.legend;
393     }
394
395     /**
396      * Setter for property legend.
397      * @param legend New value of property legend.
398      */

399     public void setLegend(boolean legend) {
400         this.legend = legend;
401     }
402
403     /**
404      * Getter for property legendAnchor.
405      * @return Value of property legendAnchor.
406      */

407     public String JavaDoc getLegendAnchor() {
408         return this.legendAnchor;
409     }
410
411     /**
412      * Setter for property legendAnchor.
413      * @param legendAnchor New value of property legendAnchor.
414      */

415     public void setLegendAnchor(String JavaDoc legendAnchor) {
416         this.legendAnchor = legendAnchor;
417     }
418
419     public boolean isLegendAnchorSelected(String JavaDoc anchor) {
420         return this.legendAnchor.equalsIgnoreCase(anchor);
421     }
422
423     /**
424      * Getter for property extraTitle.
425      * @return Value of property extraTitle.
426      */

427     public String JavaDoc getExtraTitle() {
428         return (extraTitle == null? "" : extraTitle);
429     }
430
431     /**
432      * Setter for property extraTitle.
433      * @param extraTitle New value of property extraTitle.
434      */

435     public void setExtraTitle(String JavaDoc extraTitle) {
436         this.extraTitle = extraTitle;
437     }
438
439     /**
440      * Returns the mimeType.
441      * @return String
442      */

443     public String JavaDoc getMimeType() {
444         return mimeType;
445     }
446
447     /**
448      * Sets the mimeType.
449      * @param mimeType The mimeType to set
450      */

451     public void setMimeType(String JavaDoc mimeType) {
452         this.mimeType = mimeType;
453     }
454
455 }
456
Popular Tags