KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > ruby > rhtml > RhtmlDataLoaderBeanInfo


1 package org.netbeans.modules.ruby.rhtml;
2
3 import java.awt.Image JavaDoc;
4 import java.beans.BeanInfo JavaDoc;
5 import java.beans.IntrospectionException JavaDoc;
6 import java.beans.Introspector JavaDoc;
7 import java.beans.SimpleBeanInfo JavaDoc;
8 import org.openide.loaders.UniFileLoader;
9 import org.openide.util.Utilities;
10
11 public class RhtmlDataLoaderBeanInfo extends SimpleBeanInfo JavaDoc {
12     
13     public BeanInfo JavaDoc[] getAdditionalBeanInfo() {
14         try {
15             return new BeanInfo JavaDoc[] {Introspector.getBeanInfo(UniFileLoader.class)};
16         } catch (IntrospectionException JavaDoc e) {
17             throw new AssertionError JavaDoc(e);
18         }
19     }
20     
21     public Image JavaDoc getIcon(int type) {
22         if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
23             return Utilities.loadImage("org/netbeans/modules/ruby/rhtml/rhtml16.gif");
24         } else {
25             return null;
26         }
27         
28     }
29     
30 }
31
Popular Tags