KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > share > configbean > MessageDestinationBeanInfo


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
20 package org.netbeans.modules.j2ee.sun.share.configbean;
21
22 import java.beans.*;
23 import org.openide.util.Exceptions;
24 /**
25  * @author peterw99
26  */

27 public class MessageDestinationBeanInfo extends SimpleBeanInfo {
28     
29     /**
30      * Gets the bean's <code>BeanDescriptor</code>s.
31      *
32      * @return BeanDescriptor describing the editable
33      * properties of this bean. May return null if the
34      * information should be obtained by automatic analysis.
35      */

36     public BeanDescriptor getBeanDescriptor() {
37         BeanDescriptor beanDescriptor = new BeanDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class , org.netbeans.modules.j2ee.sun.share.configbean.customizers.MessageDestinationCustomizer.class ); // NOI18N//GEN-HEADEREND:BeanDescriptor
38
return beanDescriptor;
39     }
40     
41     /**
42      * Gets the bean's <code>PropertyDescriptor</code>s.
43      *
44      * @return An array of PropertyDescriptors describing the editable
45      * properties supported by this bean. May return null if the
46      * information should be obtained by automatic analysis.
47      * <p>
48      * If a property is indexed, then its entry in the result array will
49      * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
50      * A client of getPropertyDescriptors can use "instanceof" to check
51      * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
52      */

53     public PropertyDescriptor[] getPropertyDescriptors() {
54         int PROPERTY_identity = 0;
55         int PROPERTY_jndiName = 1;
56         int PROPERTY_messageDestinationName = 2;
57         PropertyDescriptor[] properties = new PropertyDescriptor[3];
58             
59         try {
60             properties[PROPERTY_identity] = new PropertyDescriptor ( "identity", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class, "getIdentity", "setIdentity" ); // NOI18N
61
properties[PROPERTY_jndiName] = new PropertyDescriptor ( "jndiName", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class, "getJndiName", "setJndiName" ); // NOI18N
62
properties[PROPERTY_messageDestinationName] = new PropertyDescriptor ( "messageDestinationName", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class, "getMessageDestinationName", null ); // NOI18N
63
}
64         catch(IntrospectionException e) {
65             Exceptions.printStackTrace(e);
66         }
67         return properties;
68     }
69     
70     /**
71      * Gets the bean's <code>EventSetDescriptor</code>s.
72      *
73      * @return An array of EventSetDescriptors describing the kinds of
74      * events fired by this bean. May return null if the information
75      * should be obtained by automatic analysis.
76      */

77     public EventSetDescriptor[] getEventSetDescriptors() {
78         int EVENT_propertyChangeListener = 0;
79         int EVENT_vetoableChangeListener = 1;
80         EventSetDescriptor[] eventSets = new EventSetDescriptor[2];
81
82         try {
83             eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class, "propertyChangeListener", java.beans.PropertyChangeListener JavaDoc.class, new String JavaDoc[] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); // NOI18N
84
eventSets[EVENT_vetoableChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestination.class, "vetoableChangeListener", java.beans.VetoableChangeListener JavaDoc.class, new String JavaDoc[] {"vetoableChange"}, "addVetoableChangeListener", "removeVetoableChangeListener" ); // NOI18N
85
}
86         catch(IntrospectionException e) {
87             Exceptions.printStackTrace(e);
88         }
89         return eventSets;
90     }
91     
92     /**
93      * Gets the bean's <code>MethodDescriptor</code>s.
94      *
95      * @return An array of MethodDescriptors describing the methods
96      * implemented by this bean. May return null if the information
97      * should be obtained by automatic analysis.
98      */

99     public MethodDescriptor[] getMethodDescriptors() {
100         return new MethodDescriptor[0];
101     }
102 }
103
104
Popular Tags