KickJava   Java API By Example, From Geeks To Geeks.

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


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.tax.decl;
20
21 import java.beans.*;
22
23 public class SequenceTypeBeanInfo 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", SequenceType.class, "toString", null ); // NOI18N
43
} catch( IntrospectionException e) {}
44         return properties;
45     }
46   
47     /**
48      * Gets the bean's <code>EventSetDescriptor</code>s.
49      *
50      * @return An array of EventSetDescriptors describing the kinds of
51      * events fired by this bean. May return null if the information
52      * should be obtained by automatic analysis.
53      */

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

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