001: package org.netbeans.modules.webclient;
002:
003: import java.beans.*;
004:
005: public class WebclientBrowserBeanInfo extends SimpleBeanInfo {
006:
007: // Bean descriptor
008: private static BeanDescriptor beanDescriptor = null /*lazy*/;
009:
010: private static BeanDescriptor getBdescriptor() {
011: if (beanDescriptor == null) {
012: beanDescriptor = new BeanDescriptor(WebclientBrowser.class,
013: null);
014:
015: // Here you can add code for customizing the BeanDescriptor.
016:
017: }
018: return beanDescriptor;
019: }
020:
021: // Property identifiers
022: private static final int PROPERTY_appData = 0;
023:
024: // Property array
025: private static PropertyDescriptor[] properties = null /*lazy*/;
026:
027: private static PropertyDescriptor[] getPdescriptor() {
028: if (properties == null) {
029: properties = new PropertyDescriptor[1];
030:
031: try {
032: properties[PROPERTY_appData] = new PropertyDescriptor(
033: "appData", WebclientBrowser.class,
034: "getAppData", "setAppData"); // NOI18N
035: } catch (IntrospectionException e) {
036: }
037:
038: // Here you can add code for customizing the properties array.
039:
040: }
041: return properties;
042: }
043:
044: // Event set information will be obtained from introspection.
045: private static EventSetDescriptor[] eventSets = null;
046:
047: private static EventSetDescriptor[] getEdescriptor() {
048: return eventSets;
049: }
050:
051: // Here you can add code for customizing the event sets array.
052:
053: // Method information will be obtained from introspection.
054: private static MethodDescriptor[] methods = null;
055:
056: private static MethodDescriptor[] getMdescriptor() {
057: return methods;
058: }
059:
060: // Here you can add code for customizing the methods array.
061:
062: private static final int defaultPropertyIndex = -1;
063: private static final int defaultEventIndex = -1;
064:
065: /**
066: * Gets the bean's <code>BeanDescriptor</code>s.
067: *
068: * @return BeanDescriptor describing the editable
069: * properties of this bean. May return null if the
070: * information should be obtained by automatic analysis.
071: */
072: public BeanDescriptor getBeanDescriptor() {
073: //return beanDescriptor;
074: return getBdescriptor();
075: }
076:
077: /**
078: * Gets the bean's <code>PropertyDescriptor</code>s.
079: *
080: * @return An array of PropertyDescriptors describing the editable
081: * properties supported by this bean. May return null if the
082: * information should be obtained by automatic analysis.
083: * <p>
084: * If a property is indexed, then its entry in the result array will
085: * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
086: * A client of getPropertyDescriptors can use "instanceof" to check
087: * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
088: */
089: public PropertyDescriptor[] getPropertyDescriptors() {
090: //return properties;
091: return getPdescriptor();
092: }
093:
094: /**
095: * Gets the bean's <code>EventSetDescriptor</code>s.
096: *
097: * @return An array of EventSetDescriptors describing the kinds of
098: * events fired by this bean. May return null if the information
099: * should be obtained by automatic analysis.
100: */
101: public EventSetDescriptor[] getEventSetDescriptors() {
102: //return eventSets;
103: return getEdescriptor();
104: }
105:
106: }
|