KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > forte > node > XMLCDataLoaderBeanInfo


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  * Lisa Reese
21  *
22  */

23
24 package org.enhydra.kelp.forte.node;
25
26 import java.awt.Image JavaDoc;
27 import java.beans.*;
28
29 import org.openide.util.NbBundle;
30
31 import org.enhydra.kelp.common.swing.KelpIconSet;
32
33 /** Description of {@link XMLCDataLoader}.
34  *
35  * @author rees0234
36  */

37 public class XMLCDataLoaderBeanInfo extends SimpleBeanInfo {
38
39     public BeanInfo[] getAdditionalBeanInfo () {
40         try {
41             // I.e. MultiFileLoader.class or UniFileLoader.class.
42
return new BeanInfo[]
43         { Introspector.getBeanInfo (XMLCDataLoader.class.getSuperclass ()) };
44         } catch (IntrospectionException ie) {
45             if (Boolean.getBoolean ("netbeans.debug.exceptions"))
46                 ie.printStackTrace ();
47             return null;
48         }
49     }
50
51     private static Image JavaDoc icon, icon32;
52     public Image JavaDoc getIcon (int type) {
53         if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
54             if (icon == null)
55                 icon = loadImage ("smallicon.gif");
56             return icon;
57         } else {
58             if (icon32 == null)
59                 icon = loadImage ("largeicon.gif");
60             return icon32;
61         }
62     }
63
64 }
65
Popular Tags