1 19 package org.netbeans.modules.xsl; 20 21 import java.beans.*; 22 import java.awt.Image ; 23 import org.openide.util.Utilities; 24 import org.openide.loaders.MultiFileLoader; 25 import org.openide.util.Exceptions; 26 27 32 public class XSLDataLoaderBeanInfo extends SimpleBeanInfo { 33 34 private static final String ICON_DIR_BASE = "org/netbeans/modules/xsl/resources/"; 36 43 public BeanDescriptor getBeanDescriptor() { 44 BeanDescriptor beanDescriptor = new BeanDescriptor ( XSLDataLoader.class , null ); 45 beanDescriptor.setDisplayName ( Util.THIS.getString("NAME_XSLDataLoader") ); 47 49 return beanDescriptor; 50 } 51 52 64 public PropertyDescriptor[] getPropertyDescriptors() { 65 int PROPERTY_extensions = 0; 66 PropertyDescriptor[] properties = new PropertyDescriptor[1]; 67 68 try { 69 properties[PROPERTY_extensions] = new PropertyDescriptor ( "extensions", XSLDataLoader.class, "getExtensions", "setExtensions" ); 70 properties[PROPERTY_extensions].setDisplayName ( Util.THIS.getString ("PROP_XSL_Extensions") ); 71 properties[PROPERTY_extensions].setShortDescription ( Util.THIS.getString ("HINT_XSL_Extensions") ); 72 } 73 catch( IntrospectionException e) { 74 Exceptions.printStackTrace(e); 75 } 76 return properties; 77 } 78 79 86 public EventSetDescriptor[] getEventSetDescriptors() { 87 return new EventSetDescriptor[0]; 88 } 89 90 97 public MethodDescriptor[] getMethodDescriptors() { 98 return new MethodDescriptor[0]; 99 } 100 101 104 public Image getIcon(final int type) { 105 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || 106 (type == java.beans.BeanInfo.ICON_MONO_16x16)) { 107 108 return Utilities.loadImage (ICON_DIR_BASE + "xslObject.gif"); } else { 110 return Utilities.loadImage (ICON_DIR_BASE + "xslObject32.gif"); } 112 } 113 114 public BeanInfo[] getAdditionalBeanInfo() { 115 try { 116 return new BeanInfo[] { 117 java.beans.Introspector.getBeanInfo (MultiFileLoader.class) 118 }; 119 } catch (IntrospectionException e) { 120 Exceptions.printStackTrace(e); 121 } 122 return super.getAdditionalBeanInfo(); 123 } 124 125 } 126 | Popular Tags |