1 19 20 21 package org.netbeans.modules.group; 22 23 24 import java.awt.Image ; 25 import java.beans.BeanInfo ; 26 import java.beans.IntrospectionException ; 27 import java.beans.Introspector ; 28 import java.beans.PropertyDescriptor ; 29 import java.beans.SimpleBeanInfo ; 30 31 import org.openide.loaders.DataLoader; 32 import org.openide.util.NbBundle; 33 import org.openide.util.Utilities; 34 35 36 40 public class GroupShadowLoaderBeanInfo extends SimpleBeanInfo { 41 42 43 public PropertyDescriptor [] getPropertyDescriptors () { 44 try { 45 PropertyDescriptor extensions = new PropertyDescriptor ("extensions", GroupShadowLoader.class); extensions.setDisplayName (NbBundle.getBundle (GroupShadowLoaderBeanInfo.class).getString ("PROP_Extensions")); 47 extensions.setShortDescription (NbBundle.getBundle (GroupShadowLoaderBeanInfo.class).getString ("HINT_Extensions")); 48 return new PropertyDescriptor [] { extensions }; 49 } catch (IntrospectionException ie) { 50 org.openide.ErrorManager.getDefault().notify(ie); 51 52 return null; 53 } 54 } 55 56 57 public BeanInfo [] getAdditionalBeanInfo () { 58 try { 59 return new BeanInfo [] { Introspector.getBeanInfo (DataLoader.class) }; 60 } catch (IntrospectionException ie) { 61 org.openide.ErrorManager.getDefault().notify(ie); 62 63 return null; 64 } 65 } 66 67 68 public Image getIcon(int type) { 69 if((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) { 70 return Utilities.loadImage("org/netbeans/modules/group/resources/groupShadow.gif"); } else { 72 return Utilities.loadImage("org/netbeans/modules/group/resources/groupShadow32.gif"); } 74 } 75 } 76 | Popular Tags |