1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeProcessingInstruction; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeProcessingInstructionCustomizer; 24 import org.openide.util.Exceptions; 25 26 31 public class TreeProcessingInstructionBeanInfo extends SimpleBeanInfo { 32 33 40 public BeanDescriptor getBeanDescriptor() { 41 return new BeanDescriptor ( TreeProcessingInstruction.class , TreeProcessingInstructionCustomizer.class ); 42 } 43 44 56 public PropertyDescriptor[] getPropertyDescriptors() { 57 int PROPERTY_target = 0; 58 int PROPERTY_data = 1; 59 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 60 61 try { 62 properties[PROPERTY_target] = new PropertyDescriptor ( "target", TreeProcessingInstruction.class, "getTarget", "setTarget" ); properties[PROPERTY_target].setDisplayName ( Util.THIS.getString ( "PROP_TreeProcessingInstructionBeanInfo_target" ) ); 64 properties[PROPERTY_target].setShortDescription ( Util.THIS.getString ( "HINT_TreeProcessingInstructionBeanInfo_target" ) ); 65 66 properties[PROPERTY_data] = new PropertyDescriptor ( "data", TreeProcessingInstruction.class, "getData", "setData" ); properties[PROPERTY_data].setDisplayName ( Util.THIS.getString ( "PROP_TreeProcessingInstructionBeanInfo_data" ) ); 68 properties[PROPERTY_data].setShortDescription ( Util.THIS.getString ( "HINT_TreeProcessingInstructionBeanInfo_data" ) ); 69 } catch( IntrospectionException e) { 70 Exceptions.printStackTrace(e); 71 } 72 return properties; 73 } 74 75 82 public EventSetDescriptor[] getEventSetDescriptors() { 83 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 84 85 try { 86 eventSets[0] = new EventSetDescriptor ( org.netbeans.tax.TreeProcessingInstruction.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } catch( IntrospectionException e) { 88 Exceptions.printStackTrace(e); 89 } 90 return eventSets; 91 } 92 93 100 public MethodDescriptor[] getMethodDescriptors() { 101 return new MethodDescriptor[0]; 102 } 103 104 } 105 | Popular Tags |