KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > tags > ColumnTagBeanInfo


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.tags;
13
14 import java.beans.IntrospectionException JavaDoc;
15 import java.beans.PropertyDescriptor JavaDoc;
16 import java.beans.SimpleBeanInfo JavaDoc;
17 import java.util.ArrayList JavaDoc;
18 import java.util.List JavaDoc;
19
20 import org.apache.commons.lang.UnhandledException;
21
22
23 /**
24  * BeanInfo descriptor for the <code>ColumnTag</code> class..
25  * @author Fabrizio Giustina
26  * @version $Revision: 1000 $ ($Author: fgiust $)
27  */

28 public class ColumnTagBeanInfo extends SimpleBeanInfo JavaDoc
29 {
30
31     /**
32      * @see java.beans.BeanInfo#getPropertyDescriptors()
33      */

34     public PropertyDescriptor JavaDoc[] getPropertyDescriptors()
35     {
36         List JavaDoc proplist = new ArrayList JavaDoc();
37
38         try
39         {
40             proplist.add(new PropertyDescriptor JavaDoc("autolink", //$NON-NLS-1$
41
ColumnTag.class,
42                 null,
43                 "setAutolink")); //$NON-NLS-1$
44
proplist.add(new PropertyDescriptor JavaDoc("escapeXml", //$NON-NLS-1$
45
ColumnTag.class,
46                 null,
47                 "setEscapeXml")); //$NON-NLS-1$
48
proplist.add(new PropertyDescriptor JavaDoc("class", //$NON-NLS-1$
49
ColumnTag.class,
50                 null,
51                 "setClass")); //$NON-NLS-1$
52
proplist.add(new PropertyDescriptor JavaDoc("decorator", //$NON-NLS-1$
53
ColumnTag.class,
54                 null,
55                 "setDecorator")); //$NON-NLS-1$
56
proplist.add(new PropertyDescriptor JavaDoc("group", //$NON-NLS-1$
57
ColumnTag.class,
58                 null,
59                 "setGroup")); //$NON-NLS-1$
60
proplist.add(new PropertyDescriptor JavaDoc("headerClass", //$NON-NLS-1$
61
ColumnTag.class,
62                 null,
63                 "setHeaderClass")); //$NON-NLS-1$
64
proplist.add(new PropertyDescriptor JavaDoc("href", //$NON-NLS-1$
65
ColumnTag.class,
66                 null,
67                 "setHref")); //$NON-NLS-1$
68
proplist.add(new PropertyDescriptor JavaDoc("maxLength", //$NON-NLS-1$
69
ColumnTag.class,
70                 null,
71                 "setMaxLength")); //$NON-NLS-1$
72
proplist.add(new PropertyDescriptor JavaDoc("maxWords", //$NON-NLS-1$
73
ColumnTag.class,
74                 null,
75                 "setMaxWords")); //$NON-NLS-1$
76
proplist.add(new PropertyDescriptor JavaDoc("media", //$NON-NLS-1$
77
ColumnTag.class,
78                 null,
79                 "setMedia")); //$NON-NLS-1$
80
proplist.add(new PropertyDescriptor JavaDoc("nulls", //$NON-NLS-1$
81
ColumnTag.class,
82                 null,
83                 "setNulls")); //$NON-NLS-1$
84
proplist.add(new PropertyDescriptor JavaDoc("paramId", //$NON-NLS-1$
85
ColumnTag.class,
86                 null,
87                 "setParamId")); //$NON-NLS-1$
88
proplist.add(new PropertyDescriptor JavaDoc("paramName", //$NON-NLS-1$
89
ColumnTag.class,
90                 null,
91                 "setParamName")); //$NON-NLS-1$
92
proplist.add(new PropertyDescriptor JavaDoc("paramProperty", //$NON-NLS-1$
93
ColumnTag.class,
94                 null,
95                 "setParamProperty")); //$NON-NLS-1$
96
proplist.add(new PropertyDescriptor JavaDoc("paramScope", //$NON-NLS-1$
97
ColumnTag.class,
98                 null,
99                 "setParamScope")); //$NON-NLS-1$
100
proplist.add(new PropertyDescriptor JavaDoc("property", //$NON-NLS-1$
101
ColumnTag.class,
102                 null,
103                 "setProperty")); //$NON-NLS-1$
104
proplist.add(new PropertyDescriptor JavaDoc("sortable", //$NON-NLS-1$
105
ColumnTag.class,
106                 null,
107                 "setSortable")); //$NON-NLS-1$
108
proplist.add(new PropertyDescriptor JavaDoc("sortName", //$NON-NLS-1$
109
ColumnTag.class,
110                 null,
111                 "setSortName")); //$NON-NLS-1$
112
proplist.add(new PropertyDescriptor JavaDoc("style", //$NON-NLS-1$
113
ColumnTag.class,
114                 null,
115                 "setStyle")); //$NON-NLS-1$
116
proplist.add(new PropertyDescriptor JavaDoc("title", //$NON-NLS-1$
117
ColumnTag.class,
118                 null,
119                 "setTitle")); //$NON-NLS-1$
120
proplist.add(new PropertyDescriptor JavaDoc("titleKey", //$NON-NLS-1$
121
ColumnTag.class,
122                 null,
123                 "setTitleKey")); //$NON-NLS-1$
124
proplist.add(new PropertyDescriptor JavaDoc("url", //$NON-NLS-1$
125
ColumnTag.class,
126                 null,
127                 "setUrl")); //$NON-NLS-1$
128
proplist.add(new PropertyDescriptor JavaDoc("sortProperty", //$NON-NLS-1$
129
ColumnTag.class,
130                 null,
131                 "setSortProperty")); //$NON-NLS-1$
132
proplist.add(new PropertyDescriptor JavaDoc("total", //$NON-NLS-1$
133
ColumnTag.class,
134                 null,
135                 "setTotal")); //$NON-NLS-1$
136
proplist.add(new PropertyDescriptor JavaDoc("comparator", //$NON-NLS-1$
137
ColumnTag.class,
138                 null,
139                 "setComparator")); //$NON-NLS-1$
140
proplist.add(new PropertyDescriptor JavaDoc("defaultorder", //$NON-NLS-1$
141
ColumnTag.class,
142                 null,
143                 "setDefaultorder")); //$NON-NLS-1$
144
proplist.add(new PropertyDescriptor JavaDoc("headerScope", //$NON-NLS-1$
145
ColumnTag.class,
146                 null,
147                 "setHeaderScope")); //$NON-NLS-1$
148
proplist.add(new PropertyDescriptor JavaDoc("scope", //$NON-NLS-1$
149
ColumnTag.class,
150                 null,
151                 "setScope")); //$NON-NLS-1$
152
proplist.add(new PropertyDescriptor JavaDoc("format", //$NON-NLS-1$
153
ColumnTag.class,
154                 null,
155                 "setFormat")); //$NON-NLS-1$
156
proplist.add(new PropertyDescriptor JavaDoc("value", //$NON-NLS-1$
157
ColumnTag.class,
158                 null,
159                 "setValue")); //$NON-NLS-1$
160

161             // make ATG Dynamo happy:
162
proplist.add(new PropertyDescriptor JavaDoc("className", //$NON-NLS-1$
163
ColumnTag.class,
164                 null,
165                 "setClass")); // map //$NON-NLS-1$
166

167         }
168         catch (IntrospectionException JavaDoc ex)
169         {
170             throw new UnhandledException("You got an introspection exception - maybe defining a property that is not"
171                 + " defined in the ColumnTag?: "
172                 + ex.getMessage(), ex);
173         }
174
175         PropertyDescriptor JavaDoc[] result = new PropertyDescriptor JavaDoc[proplist.size()];
176         return ((PropertyDescriptor JavaDoc[]) proplist.toArray(result));
177     }
178
179 }
Popular Tags