KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > grid > ed > VButtonBeanInfo


1 package org.compiere.grid.ed;
2
3 import java.beans.*;
4
5 /**
6  * Generated
7  *
8  * @author Jorg Janke
9  * @version $Id: VButtonBeanInfo.java,v 1.2 2001/10/16 03:02:12 jjanke Exp $
10  */

11
12 public class VButtonBeanInfo extends SimpleBeanInfo
13 {
14     private Class JavaDoc beanClass = VButton.class;
15     private String JavaDoc iconColor16x16Filename;
16     private String JavaDoc iconColor32x32Filename;
17     private String JavaDoc iconMono16x16Filename;
18     private String JavaDoc iconMono32x32Filename;
19
20     public VButtonBeanInfo()
21     {
22     }
23     public PropertyDescriptor[] getPropertyDescriptors()
24     {
25         try
26         {
27             PropertyDescriptor _columnName = new PropertyDescriptor("columnName", beanClass, "getColumnName", null);
28             PropertyDescriptor _description = new PropertyDescriptor("description", beanClass, "getDescription", null);
29             PropertyDescriptor _display = new PropertyDescriptor("display", beanClass, "getDisplay", null);
30             PropertyDescriptor _editable = new PropertyDescriptor("editable", beanClass, "isEditable", "setEditable");
31             PropertyDescriptor _help = new PropertyDescriptor("help", beanClass, "getHelp", null);
32             PropertyDescriptor _mandatory = new PropertyDescriptor("mandatory", beanClass, "isMandatory", "setMandatory");
33             PropertyDescriptor _process_ID = new PropertyDescriptor("process_ID", beanClass, "getProcess_ID", null);
34             PropertyDescriptor _value = new PropertyDescriptor("value", beanClass, "getValue", "setValue");
35             PropertyDescriptor _values = new PropertyDescriptor("values", beanClass, "getValues", null);
36             PropertyDescriptor[] pds = new PropertyDescriptor[] {
37                 _columnName,
38                 _description,
39                 _display,
40                 _editable,
41                 _help,
42                 _mandatory,
43                 _process_ID,
44                 _value,
45                 _values};
46             return pds;
47
48
49
50
51
52
53
54
55
56 }
57         catch(IntrospectionException ex)
58         {
59             ex.printStackTrace();
60             return null;
61         }
62     }
63     public java.awt.Image JavaDoc getIcon(int iconKind)
64     {
65         switch (iconKind) {
66         case BeanInfo.ICON_COLOR_16x16:
67               return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
68         case BeanInfo.ICON_COLOR_32x32:
69               return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
70         case BeanInfo.ICON_MONO_16x16:
71               return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename) : null;
72         case BeanInfo.ICON_MONO_32x32:
73               return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename) : null;
74                                 }
75         return null;
76     }
77     public BeanInfo[] getAdditionalBeanInfo()
78     {
79         Class JavaDoc superclass = beanClass.getSuperclass();
80         try
81         {
82             BeanInfo superBeanInfo = Introspector.getBeanInfo(superclass);
83             return new BeanInfo[] { superBeanInfo };
84         }
85         catch(IntrospectionException ex)
86         {
87             ex.printStackTrace();
88             return null;
89         }
90     }
91 }
Popular Tags