1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeAttlistDecl; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeAttlistDeclCustomizer; 24 import org.netbeans.modules.xml.tax.beans.editor.TreeAttlistDeclAttributeListEditor; 25 import org.openide.util.Exceptions; 26 27 32 public class TreeAttlistDeclBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor ( TreeAttlistDecl.class , TreeAttlistDeclCustomizer.class ); 43 } 44 45 57 public PropertyDescriptor[] getPropertyDescriptors() { 58 int PROPERTY_elementName = 0; 59 int PROPERTY_attributeDefs = 1; 60 61 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 62 63 try { 64 properties[PROPERTY_elementName] = new PropertyDescriptor ( "elementName", TreeAttlistDecl.class, "getElementName", null ); properties[PROPERTY_elementName].setDisplayName ( Util.THIS.getString ( "PROP_TreeAttlistDeclBeanInfo_elementName" ) ); 66 properties[PROPERTY_elementName].setShortDescription ( Util.THIS.getString ( "HINT_TreeAttlistDeclBeanInfo_elementName" ) ); 67 68 properties[PROPERTY_attributeDefs] = new PropertyDescriptor ( "attributeDefs", TreeAttlistDecl.class, "getAttributeDefs", null ); properties[PROPERTY_attributeDefs].setDisplayName ( Util.THIS.getString ( "PROP_TreeAttlistDeclBeanInfo_attributeDefs" ) ); 70 properties[PROPERTY_attributeDefs].setShortDescription ( Util.THIS.getString ( "HINT_TreeAttlistDeclBeanInfo_attributeDefs" ) ); 71 properties[PROPERTY_attributeDefs].setPropertyEditorClass ( TreeAttlistDeclAttributeListEditor.class ); 72 } catch( IntrospectionException e) { 73 Exceptions.printStackTrace(e); 74 } 75 76 return properties; 77 } 78 79 86 public EventSetDescriptor[] getEventSetDescriptors() { 87 int EVENT_propertyChangeListener = 0; 88 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 89 90 try { 91 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.tax.TreeAttlistDecl.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } 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 } 111 | Popular Tags |