KickJava   Java API By Example, From Geeks To Geeks.

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


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

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