KickJava   Java API By Example, From Geeks To Geeks.

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


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 DeployDataLoader}.
34  *
35  * @author rees0234
36  */

37 public class DeployDataLoaderBeanInfo extends SimpleBeanInfo {
38
39     // If you have additional properties:
40
/*
41     public PropertyDescriptor[] getPropertyDescriptors () {
42     try {
43             PropertyDescriptor myProp = new PropertyDescriptor ("myProp", DeployDataLoader.class);
44             myProp.setDisplayName (NbBundle.getMessage (DeployDataLoaderBeanInfo.class, "PROP_myProp"));
45             myProp.setShortDescription (NbBundle.getMessage (DeployDataLoaderBeanInfo.class, "HINT_myProp"));
46         return new PropertyDescriptor[] { myProp };
47     } catch (IntrospectionException ie) {
48         if (Boolean.getBoolean ("netbeans.debug.exceptions"))
49         ie.printStackTrace ();
50         return null;
51     }
52     }
53     */

54
55     public BeanInfo[] getAdditionalBeanInfo () {
56         try {
57             // I.e. MultiFileLoader.class or UniFileLoader.class.
58
return new BeanInfo[]
59         { Introspector.getBeanInfo (DeployDataLoader.class.getSuperclass ()) };
60         } catch (IntrospectionException ie) {
61             if (Boolean.getBoolean ("netbeans.debug.exceptions"))
62                 ie.printStackTrace ();
63             return null;
64         }
65     }
66
67     private static Image JavaDoc icon, icon32;
68     public Image JavaDoc getIcon (int type) {
69         if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
70             if (icon == null){
71                 icon = loadImage ("smallicon.gif");
72             }
73 // icon = KelpIconSet.getSmallIcon().getImage();
74
return icon;
75         } else {
76             if (icon32 == null)
77                 icon32 = loadImage ("largeicon.gif");
78 // icon32 = KelpIconSet.getSmallIcon().getImage();
79
return icon32;
80         }
81     }
82
83 }
84
Popular Tags