1 19 20 package org.netbeans.modules.xml.wsdl.ui.netbeans.module; 21 22 import java.awt.Image ; 23 import java.beans.BeanInfo ; 24 import java.beans.IntrospectionException ; 25 import java.beans.Introspector ; 26 import java.beans.PropertyDescriptor ; 27 import java.beans.SimpleBeanInfo ; 28 import org.openide.ErrorManager; 29 import org.openide.util.NbBundle; 30 31 import org.openide.util.Utilities; 32 33 37 public class WSDLDataLoaderBeanInfo extends SimpleBeanInfo { 38 39 40 41 44 public PropertyDescriptor [] getPropertyDescriptors() { 45 try { 53 PropertyDescriptor extensions = new PropertyDescriptor ( 54 "extensions", WSDLDataLoader.class, "getExtensions", null); extensions.setDisplayName( 56 NbBundle.getMessage(WSDLDataLoaderBeanInfo.class, "PROP_extensions")); 57 extensions.setShortDescription( 58 NbBundle.getMessage(WSDLDataLoaderBeanInfo.class, "HINT_extensions")); 59 extensions.setExpert(true); 60 return new PropertyDescriptor [] {extensions}; 61 } catch (IntrospectionException ie) { 62 ErrorManager.getDefault().notify(ie); 63 return null; 64 } 65 } 66 67 68 82 83 public BeanInfo [] getAdditionalBeanInfo () { 84 try { 85 return new BeanInfo [] { Introspector.getBeanInfo(WSDLDataLoader.class.getSuperclass()) }; 87 } catch (IntrospectionException ie) { 88 org.openide.ErrorManager.getDefault ().notify (ie); 89 return null; 90 } 91 } 92 93 public Image getIcon (int type) { 94 if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) { 95 return Utilities.loadImage ("org.netbeans.modules.xml.wsdl.ui.netbeans.module/resources/wsdl16.gif"); 96 } else { 97 return Utilities.loadImage ("org.netbeans.modules.xml.wsdl.ui.netbeans.module/resources/wsdl32.gif"); 98 } 99 } 100 101 } 102 | Popular Tags |