1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeAttlistDeclAttributeDef; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeAttlistDeclAttributeDefCustomizer; 24 import org.openide.util.Exceptions; 25 26 31 public class TreeAttlistDeclAttributeDefBeanInfo extends SimpleBeanInfo { 32 33 40 public BeanDescriptor getBeanDescriptor() { 41 return new BeanDescriptor ( TreeAttlistDeclAttributeDef.class , TreeAttlistDeclAttributeDefCustomizer.class ); 42 } 43 44 56 public PropertyDescriptor[] getPropertyDescriptors() { 57 int PROPERTY_name = 0; 58 int PROPERTY_defaultValue = 1; 59 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 60 61 try { 62 properties[PROPERTY_name] = new PropertyDescriptor ( "name", TreeAttlistDeclAttributeDef.class, "getName", null ); properties[PROPERTY_name].setDisplayName ( Util.THIS.getString ( "PROP_TreeAttlistDeclAttributeDefBeanInfo_name" ) ); 64 properties[PROPERTY_name].setShortDescription ( Util.THIS.getString ( "HINT_TreeAttlistDeclAttributeDefBeanInfo_name" ) ); 65 properties[PROPERTY_defaultValue] = new PropertyDescriptor ( "defaultValue", TreeAttlistDeclAttributeDef.class, "getDefaultValue", null ); properties[PROPERTY_defaultValue].setDisplayName ( Util.THIS.getString ( "PROP_TreeAttlistDeclAttributeDefBeanInfo_defaultValue" ) ); 67 properties[PROPERTY_defaultValue].setShortDescription ( Util.THIS.getString ( "HINT_TreeAttlistDeclAttributeDefBeanInfo_defaultValue" ) ); 68 } catch( IntrospectionException e) { 69 Exceptions.printStackTrace(e); 70 } 71 72 return properties; 73 } 74 75 82 public EventSetDescriptor[] getEventSetDescriptors() { 83 int EVENT_propertyChangeListener = 0; 84 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 85 86 try { 87 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.tax.TreeAttlistDeclAttributeDef.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } 89 catch( IntrospectionException e) { 90 Exceptions.printStackTrace(e); 91 } 92 93 return eventSets; 94 } 95 96 103 public MethodDescriptor[] getMethodDescriptors() { 104 return new MethodDescriptor[0]; 105 } 106 107 } 108 | Popular Tags |