1 19 20 package org.netbeans.modules.lexer.editorbridge.calc; 21 22 import java.beans.BeanInfo ; 23 import java.beans.SimpleBeanInfo ; 24 import java.beans.Introspector ; 25 import java.beans.IntrospectionException ; 26 import java.awt.Image ; 27 import org.openide.ErrorManager; 28 import org.openide.util.Utilities; 29 import org.openide.loaders.UniFileLoader; 30 31 37 38 public class CalcDataLoaderBeanInfo extends SimpleBeanInfo { 39 40 public BeanInfo [] getAdditionalBeanInfo () { 41 try { 42 return new BeanInfo [] { Introspector.getBeanInfo (UniFileLoader.class) }; 43 } catch (IntrospectionException ie) { 44 ErrorManager.getDefault().notify(ie); 45 return null; 46 } 47 } 48 49 public Image getIcon(final int type) { 50 if ((type == BeanInfo.ICON_COLOR_16x16) || 51 (type == BeanInfo.ICON_MONO_16x16) 52 ) { 53 return Utilities.loadImage("org/netbeans/modules/lexer/editorbridge/calc/resources/calcLoader.png"); } else { 55 return Utilities.loadImage ("org/netbeans/modules/lexer/editorbridge/calc/resources/calcLoader32.png"); } 57 } 58 59 } 60 | Popular Tags |