1 19 20 package org.netbeans.modules.j2ee.sun.share.configbean; 21 22 import java.beans.*; 23 import org.openide.util.Exceptions; 24 25 28 public class MessageDestinationRefBeanInfo extends SimpleBeanInfo { 29 30 32 public java.awt.Image getIcon(int iconKind) { 33 return loadImage("resources/MessageDestinationRefIcon16.gif"); } 35 36 43 public BeanDescriptor getBeanDescriptor() { 44 BeanDescriptor beanDescriptor = new BeanDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class , org.netbeans.modules.j2ee.sun.share.configbean.customizers.MessageDestinationRefCustomizer.class ); return beanDescriptor; 46 } 47 48 60 public PropertyDescriptor[] getPropertyDescriptors() { 61 int PROPERTY_identity = 0; 62 int PROPERTY_jndiName = 1; 63 int PROPERTY_messageDestinationRefName = 2; 64 PropertyDescriptor[] properties = new PropertyDescriptor[3]; 65 66 try { 67 properties[PROPERTY_identity] = new PropertyDescriptor ( "identity", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class, "getIdentity", "setIdentity" ); properties[PROPERTY_jndiName] = new PropertyDescriptor ( "jndiName", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class, "getJndiName", "setJndiName" ); properties[PROPERTY_messageDestinationRefName] = new PropertyDescriptor ( "messageDestinationRefName", org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class, "getMessageDestinationRefName", null ); } 71 catch(IntrospectionException e) { 72 Exceptions.printStackTrace(e); 73 } 74 return properties; 75 } 76 77 84 public EventSetDescriptor[] getEventSetDescriptors() { 85 int EVENT_propertyChangeListener = 0; 86 int EVENT_vetoableChangeListener = 1; 87 EventSetDescriptor[] eventSets = new EventSetDescriptor[2]; 88 89 try { 90 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); eventSets[EVENT_vetoableChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.MessageDestinationRef.class, "vetoableChangeListener", java.beans.VetoableChangeListener .class, new String [] {"vetoableChange"}, "addVetoableChangeListener", "removeVetoableChangeListener" ); } 93 catch(IntrospectionException e) { 94 Exceptions.printStackTrace(e); 95 } 96 return eventSets; 97 } 98 99 106 public MethodDescriptor[] getMethodDescriptors() { 107 return new MethodDescriptor[0]; 108 } 109 } 110 | Popular Tags |