~ubuntu-branches/ubuntu/quantal/netbeans/quantal

« back to all changes in this revision

Viewing changes to extbrowser/webclient/src/org/netbeans/modules/webclient/WebclientBrowserBeanInfo.java

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.netbeans.modules.webclient;
 
2
 
 
3
import java.beans.*;
 
4
 
 
5
public class WebclientBrowserBeanInfo extends SimpleBeanInfo {
 
6
 
 
7
 
 
8
    // Bean descriptor
 
9
    private static BeanDescriptor beanDescriptor = null /*lazy*/; 
 
10
 
 
11
    private static BeanDescriptor getBdescriptor(){
 
12
        if(beanDescriptor == null){
 
13
            beanDescriptor = new BeanDescriptor  ( WebclientBrowser.class , null );
 
14
 
 
15
    // Here you can add code for customizing the BeanDescriptor.
 
16
 
 
17
        }         return beanDescriptor;         }
 
18
 
 
19
    // Property identifiers
 
20
    private static final int PROPERTY_appData = 0;
 
21
 
 
22
    // Property array 
 
23
    private static PropertyDescriptor[] properties = null /*lazy*/; 
 
24
 
 
25
    private static PropertyDescriptor[] getPdescriptor(){
 
26
        if(properties == null){
 
27
            properties = new PropertyDescriptor[1];
 
28
    
 
29
            try {
 
30
                properties[PROPERTY_appData] = new PropertyDescriptor ( "appData", WebclientBrowser.class, "getAppData", "setAppData" ); // NOI18N
 
31
            }
 
32
            catch( IntrospectionException e) {}
 
33
 
 
34
    // Here you can add code for customizing the properties array.
 
35
 
 
36
        }         return properties;         }
 
37
 
 
38
    // Event set information will be obtained from introspection.
 
39
    private static EventSetDescriptor[] eventSets = null;
 
40
    private static EventSetDescriptor[] getEdescriptor(){
 
41
        return eventSets;
 
42
    }
 
43
 
 
44
    // Here you can add code for customizing the event sets array.
 
45
 
 
46
 
 
47
    // Method information will be obtained from introspection.
 
48
    private static MethodDescriptor[] methods = null;
 
49
    private static MethodDescriptor[] getMdescriptor(){
 
50
        return methods;
 
51
    }
 
52
 
 
53
    // Here you can add code for customizing the methods array.
 
54
    
 
55
 
 
56
    private static final int defaultPropertyIndex = -1;
 
57
    private static final int defaultEventIndex = -1;
 
58
 
 
59
 
 
60
    /**
 
61
     * Gets the bean's <code>BeanDescriptor</code>s.
 
62
     * 
 
63
     * @return BeanDescriptor describing the editable
 
64
     * properties of this bean.  May return null if the
 
65
     * information should be obtained by automatic analysis.
 
66
     */
 
67
    public BeanDescriptor getBeanDescriptor() {
 
68
        //return beanDescriptor;
 
69
        return getBdescriptor();
 
70
    }
 
71
 
 
72
    /**
 
73
     * Gets the bean's <code>PropertyDescriptor</code>s.
 
74
     * 
 
75
     * @return An array of PropertyDescriptors describing the editable
 
76
     * properties supported by this bean.  May return null if the
 
77
     * information should be obtained by automatic analysis.
 
78
     * <p>
 
79
     * If a property is indexed, then its entry in the result array will
 
80
     * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
 
81
     * A client of getPropertyDescriptors can use "instanceof" to check
 
82
     * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
 
83
     */
 
84
    public PropertyDescriptor[] getPropertyDescriptors() {
 
85
        //return properties;
 
86
        return getPdescriptor();
 
87
    }
 
88
 
 
89
    /**
 
90
     * Gets the bean's <code>EventSetDescriptor</code>s.
 
91
     * 
 
92
     * @return  An array of EventSetDescriptors describing the kinds of 
 
93
     * events fired by this bean.  May return null if the information
 
94
     * should be obtained by automatic analysis.
 
95
     */
 
96
    public EventSetDescriptor[] getEventSetDescriptors() {
 
97
        //return eventSets;
 
98
        return getEdescriptor();
 
99
    }
 
100
 
 
101
}
 
102