KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > JRField


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * JRField.java
28  *
29  */

30
31 package it.businesslogic.ireport;
32
33 import it.businesslogic.ireport.util.Misc;
34
35 public class JRField
36 {
37     private String JavaDoc name;
38     private String JavaDoc description="";
39     private String JavaDoc classType;
40         
41     
42     public JRField(String JavaDoc name, String JavaDoc classType)
43     {
44         this.name = name;
45         this.classType = classType;
46     }
47     
48     public String JavaDoc toString()
49     {
50             return name;
51     }
52         
53         /** Getter for property classType.
54          * @return Value of property classType.
55          *
56          */

57         public java.lang.String JavaDoc getClassType() {
58             return classType;
59         }
60         
61         /** Setter for property classType.
62          * @param classType New value of property classType.
63          *
64          */

65         public void setClassType(java.lang.String JavaDoc classType) {
66             this.classType = Misc.getJRFieldType( classType );
67         }
68         
69         /** Getter for property description.
70          * @return Value of property description.
71          *
72          */

73         public java.lang.String JavaDoc getDescription() {
74             return description;
75         }
76         
77         /** Setter for property description.
78          * @param description New value of property description.
79          *
80          */

81         public void setDescription(java.lang.String JavaDoc description) {
82             this.description = description;
83         }
84         
85         /** Getter for property name.
86          * @return Value of property name.
87          *
88          */

89         public java.lang.String JavaDoc getName() {
90             return name;
91         }
92         
93         /** Setter for property name.
94          * @param name New value of property name.
95          *
96          */

97         public void setName(java.lang.String JavaDoc name) {
98             this.name = name;
99         }
100         
101         public JRField cloneMe()
102         {
103             JRField jrf = new JRField(name, classType);
104             
105             jrf.setDescription( description );
106             
107             return jrf;
108         }
109
110         
111 }
112
Popular Tags