1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeElementDecl; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeElementDeclCustomizer; 24 import org.openide.util.Exceptions; 25 26 31 public class TreeElementDeclBeanInfo extends SimpleBeanInfo { 32 33 40 public BeanDescriptor getBeanDescriptor() { 41 return new BeanDescriptor ( TreeElementDecl.class , TreeElementDeclCustomizer.class ); 42 } 43 44 56 public PropertyDescriptor[] getPropertyDescriptors() { 57 int PROPERTY_name = 0; 58 PropertyDescriptor[] properties = new PropertyDescriptor[1]; 59 60 try { 61 properties[PROPERTY_name] = new PropertyDescriptor ( "name", TreeElementDecl.class, "getName", null ); properties[PROPERTY_name].setDisplayName ( Util.THIS.getString ( "PROP_TreeElementDeclBeanInfo_name" ) ); 63 properties[PROPERTY_name].setShortDescription ( Util.THIS.getString ( "HINT_TreeElementDeclBeanInfo_name" ) ); 64 } catch( IntrospectionException e) { 65 Exceptions.printStackTrace(e); 66 } 67 return properties; 68 } 69 70 77 public EventSetDescriptor[] getEventSetDescriptors() { 78 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 79 80 try { 81 eventSets[0] = new EventSetDescriptor ( org.netbeans.tax.TreeElementDecl.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } catch( IntrospectionException e) { 83 Exceptions.printStackTrace(e); 84 } 85 return eventSets; 86 } 87 88 95 public MethodDescriptor[] getMethodDescriptors() { 96 return new MethodDescriptor[0]; 97 } 98 99 } 100 | Popular Tags |