1 19 20 package org.netbeans.beaninfo; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 25 import org.openide.loaders.MultiFileLoader; 26 import org.openide.util.Exceptions; 27 import org.openide.util.Utilities; 28 29 public class XMLDataObject { 30 31 public static class LoaderBeanInfo extends SimpleBeanInfo { 32 33 public BeanInfo[] getAdditionalBeanInfo () { 34 try { 35 return new BeanInfo[] { Introspector.getBeanInfo (MultiFileLoader.class) }; 36 } catch (IntrospectionException ie) { 37 Exceptions.printStackTrace(ie); 38 return null; 39 } 40 } 41 42 public Image getIcon (int type) { 43 if ((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16)) { 44 return Utilities.loadImage("org/openide/resources/xmlObject.gif"); } else { 46 return Utilities.loadImage ("org/openide/resources/xmlObject32.gif"); } 48 } 49 50 } 51 52 } 53 | Popular Tags |