1 19 20 package org.netbeans.beaninfo; 21 22 import java.awt.Image ; 23 24 import java.beans.*; 25 import java.util.ResourceBundle ; 26 import org.openide.util.Exceptions; 27 28 import org.openide.util.NbBundle; 29 import org.openide.util.Utilities; 30 31 35 public class IndentEngineBeanInfo extends SimpleBeanInfo { 36 37 public BeanDescriptor getBeanDescriptor () { 38 BeanDescriptor descr = new BeanDescriptor (org.openide.text.IndentEngine.class); 39 ResourceBundle bundle = NbBundle.getBundle(IndentEngineBeanInfo.class); 40 descr.setDisplayName (bundle.getString ("LAB_IndentEngine")); descr.setShortDescription (bundle.getString ("HINT_IndentEngine")); descr.setValue("global", Boolean.TRUE); 44 return descr; 45 } 46 47 public BeanInfo[] getAdditionalBeanInfo () { 48 try { 49 return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) }; 50 } catch (IntrospectionException ie) { 51 Exceptions.printStackTrace(ie); 52 return null; 53 } 54 } 55 56 59 public Image getIcon(int type) { 60 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) 61 return Utilities.loadImage("org/netbeans/core/resources/indentEngines.gif"); else 63 return Utilities.loadImage("org/netbeans/core/resources/indentEngines.gif"); } 65 } 66 | Popular Tags |