1 19 package org.netbeans.modules.xml.tax.beans.beaninfo; 20 21 import java.beans.*; 22 import org.netbeans.tax.TreeConditionalSection; 23 import org.netbeans.modules.xml.tax.beans.customizer.TreeConditionalSectionCustomizer; 24 import org.netbeans.modules.xml.tax.beans.editor.NullStringEditor; 25 import org.openide.util.Exceptions; 26 27 32 public class TreeConditionalSectionBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor ( TreeConditionalSection.class , TreeConditionalSectionCustomizer.class ); 43 } 44 45 57 public PropertyDescriptor[] getPropertyDescriptors() { 58 int PROPERTY_ignoredContent = 0; 59 int PROPERTY_include = 1; 60 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 61 62 try { 63 properties[PROPERTY_ignoredContent] = new PropertyDescriptor ( "ignoredContent", TreeConditionalSection.class, "getIgnoredContent", null ); properties[PROPERTY_ignoredContent].setDisplayName ( Util.THIS.getString ( "PROP_TreeConditionalSectionBeanInfo_ignoredContent" ) ); 65 properties[PROPERTY_ignoredContent].setShortDescription ( Util.THIS.getString ( "HINT_TreeConditionalSectionBeanInfo_ignoredContent" ) ); 66 properties[PROPERTY_ignoredContent].setPropertyEditorClass ( NullStringEditor.class ); 67 68 properties[PROPERTY_include] = new PropertyDescriptor ( "include", TreeConditionalSection.class, "isInclude", null ); properties[PROPERTY_include].setDisplayName ( Util.THIS.getString ( "PROP_TreeConditionalSectionBeanInfo_include" ) ); 70 properties[PROPERTY_include].setShortDescription ( Util.THIS.getString ( "HINT_TreeConditionalSectionBeanInfo_include" ) ); 71 } catch( IntrospectionException e) { 72 Exceptions.printStackTrace(e); 73 } 74 return properties; 75 } 76 77 84 public EventSetDescriptor[] getEventSetDescriptors() { 85 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 86 87 try { 88 eventSets[0] = new EventSetDescriptor ( org.netbeans.tax.TreeConditionalSection.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); } catch( IntrospectionException e) { 90 Exceptions.printStackTrace(e); 91 } 92 return eventSets; 93 } 94 95 102 public MethodDescriptor[] getMethodDescriptors() { 103 return new MethodDescriptor[0]; 104 } 105 106 } 107 | Popular Tags |