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;
15 import java.beans.PropertyDescriptor;
16 import java.beans.SimpleBeanInfo;
17 import java.util.ArrayList;
18 import java.util.List;
19
20
21 /***
22 * Needed to make the "class" tag attribute working.
23 * @author Fabrizio Giustina
24 * @version $Revision: 1.6 $ ($Author: fgiust $)
25 */
26 public class CaptionTagBeanInfo extends SimpleBeanInfo
27 {
28
29 /***
30 * @see java.beans.BeanInfo#getPropertyDescriptors()
31 */
32 public PropertyDescriptor[] getPropertyDescriptors()
33 {
34 List proplist = new ArrayList();
35
36 try
37 {
38 proplist.add(new PropertyDescriptor("class",
39 CaptionTag.class, null, "setClass"));
40 proplist.add(new PropertyDescriptor("dir",
41 CaptionTag.class, null, "setDir"));
42 proplist.add(new PropertyDescriptor("id",
43 CaptionTag.class, null, "setId"));
44 proplist.add(new PropertyDescriptor("lang",
45 CaptionTag.class, null, "setLang"));
46 proplist.add(new PropertyDescriptor("style",
47 CaptionTag.class, null, "setStyle"));
48 proplist.add(new PropertyDescriptor("title",
49 CaptionTag.class, null, "setTitle"));
50
51
52
53
54 proplist.add(new PropertyDescriptor("className",
55 CaptionTag.class, null, "setClass"));
56 }
57 catch (IntrospectionException ex)
58 {
59
60 }
61
62 PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
63 return ((PropertyDescriptor[]) proplist.toArray(result));
64 }
65
66 }