KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > tax > decl > EMPTYTypeBeanInfo


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.tax.decl;
20
21 import java.beans.*;
22
23 public class EMPTYTypeBeanInfo extends SimpleBeanInfo {
24
25     /**
26      * Gets the bean's <code>PropertyDescriptor</code>s.
27      *
28      * @return An array of PropertyDescriptors describing the editable
29      * properties supported by this bean. May return null if the
30      * information should be obtained by automatic analysis.
31      * <p>
32      * If a property is indexed, then its entry in the result array will
33      * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
34      * A client of getPropertyDescriptors can use "instanceof" to check
35      * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
36      */

37     public PropertyDescriptor[] getPropertyDescriptors () {
38         int PROPERTY_XMLString = 0;
39         PropertyDescriptor[] properties = new PropertyDescriptor[1];
40         
41         try {
42             properties[PROPERTY_XMLString] = new PropertyDescriptor ( "XMLString", EMPTYType.class, "toString", null ); // NOI18N
43
} catch( IntrospectionException e) {
44         }
45         return properties;
46     }
47   
48     /**
49      * Gets the bean's <code>EventSetDescriptor</code>s.
50      *
51      * @return An array of EventSetDescriptors describing the kinds of
52      * events fired by this bean. May return null if the information
53      * should be obtained by automatic analysis.
54      */

55     public EventSetDescriptor[] getEventSetDescriptors () {
56         int EVENT_propertyChangeListener = 0;
57         EventSetDescriptor[] eventSets = new EventSetDescriptor[1];
58         
59         try {
60             eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( EMPTYType.class, "propertyChangeListener", PropertyChangeListener.class, new String JavaDoc[] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); // NOI18N
61
}
62         catch( IntrospectionException e) {}
63         return eventSets;
64     }
65   
66     /**
67      * Gets the bean's <code>MethodDescriptor</code>s.
68      *
69      * @return An array of MethodDescriptors describing the methods
70      * implemented by this bean. May return null if the information
71      * should be obtained by automatic analysis.
72      */

73     public MethodDescriptor[] getMethodDescriptors () {
74         return new MethodDescriptor[0];
75     }
76 }
77
Popular Tags