1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeNotationDecl; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeNotationDeclCustomizer; 24 import org.netbeans.modules.xml.tax.beans.editor.NullStringEditor; 25 import org.openide.util.Exceptions; 26 27 32 public class TreeNotationDeclBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor ( TreeNotationDecl.class , TreeNotationDeclCustomizer.class ); 43 } 44 45 57 public PropertyDescriptor[] getPropertyDescriptors() { 58 int PROPERTY_systemId = 0; 59 int PROPERTY_name = 1; 60 int PROPERTY_publicId = 2; 61 PropertyDescriptor[] properties = new PropertyDescriptor[3]; 62 63 try { 64 properties[PROPERTY_systemId] = new PropertyDescriptor ( "systemId", TreeNotationDecl.class, "getSystemId", null ); properties[PROPERTY_systemId].setDisplayName ( Util.THIS.getString ( "PROP_TreeNotationDeclBeanInfo_systemId" ) ); 66 properties[PROPERTY_systemId].setShortDescription ( Util.THIS.getString ( "HINT_TreeNotationDeclBeanInfo_systemId" ) ); 67 properties[PROPERTY_systemId].setPropertyEditorClass ( NullStringEditor.class ); 68 69 properties[PROPERTY_name] = new PropertyDescriptor ( "name", TreeNotationDecl.class, "getName", null ); properties[PROPERTY_name].setDisplayName ( Util.THIS.getString ( "PROP_TreeNotationDeclBeanInfo_name" ) ); 71 properties[PROPERTY_name].setShortDescription ( Util.THIS.getString ( "HINT_TreeNotationDeclBeanInfo_name" ) ); 72 73 properties[PROPERTY_publicId] = new PropertyDescriptor ( "publicId", TreeNotationDecl.class, "getPublicId", null ); properties[PROPERTY_publicId].setDisplayName ( Util.THIS.getString ( "PROP_TreeNotationDeclBeanInfo_publicId" ) ); 75 properties[PROPERTY_publicId].setShortDescription ( Util.THIS.getString ( "HINT_TreeNotationDeclBeanInfo_publicId" ) ); 76 properties[PROPERTY_publicId].setPropertyEditorClass ( NullStringEditor.class ); 77 } catch( IntrospectionException e) { 78 Exceptions.printStackTrace(e); 79 } 80 return properties; 81 } 82 83 90 public EventSetDescriptor[] getEventSetDescriptors() { 91 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 92 93 try { 94 eventSets[0] = new EventSetDescriptor ( org.netbeans.tax.TreeNotationDecl.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } catch( IntrospectionException e) { 96 Exceptions.printStackTrace(e); 97 } 98 return eventSets; 99 } 100 101 108 public MethodDescriptor[] getMethodDescriptors() { 109 return new MethodDescriptor[0]; 110 } 111 112 } 113 | Popular Tags |