1 19 20 package org.netbeans.core.execution.beaninfo; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 import java.util.logging.Level ; 25 import java.util.logging.Logger ; 26 27 import org.openide.execution.ScriptType; 28 import org.openide.util.Utilities; 29 30 33 public class ScriptTypeBeanInfo extends SimpleBeanInfo { 34 35 public BeanDescriptor getBeanDescriptor () { 36 return new BeanDescriptor(ScriptType.class); 37 } 38 39 public BeanInfo[] getAdditionalBeanInfo () { 40 try { 41 return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) }; 42 } catch (IntrospectionException ie) { 43 Logger.getLogger(ScriptTypeBeanInfo.class.getName()).log(Level.WARNING, null, ie); 44 return null; 45 } 46 } 47 48 51 public Image getIcon(int type) { 52 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) 53 return Utilities.loadImage("org/netbeans/core/resources/scriptTypes.gif"); else 55 return Utilities.loadImage("org/netbeans/core/resources/scriptTypes32.gif"); } 57 58 } 59 | Popular Tags |