KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > forte > DeploySettingsBeanInfo


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;
25
26 import java.awt.Image JavaDoc;
27 import java.beans.*;
28
29 import org.openide.util.NbBundle;
30
31 /** Description of {@link DeploySettings}.
32  *
33  * @author rees0234
34  */

35 public class DeploySettingsBeanInfo extends SimpleBeanInfo {
36
37     public PropertyDescriptor[] getPropertyDescriptors () {
38         try {
39             PropertyDescriptor deployRoot = new PropertyDescriptor ("deployRoot", DeploySettings.class);
40             deployRoot.setDisplayName (NbBundle.getMessage (DeploySettingsBeanInfo.class, "PROP_enhydra.deploy.root"));
41             deployRoot.setShortDescription (NbBundle.getMessage (DeploySettingsBeanInfo.class, "HINT_enhydra.deploy.root"));
42             return new PropertyDescriptor[] { deployRoot};
43         } catch (IntrospectionException ie) {
44             if (Boolean.getBoolean ("netbeans.debug.exceptions"))
45                 ie.printStackTrace ();
46             return null;
47         }
48  
49     }
50     
51     public BeanDescriptor getBeanDescriptor()
52     {
53         return new BeanDescriptor(DeploySettings.class, DeploySettingsCustomizer.class);
54     }
55     
56     private static Image JavaDoc icon, icon32;
57     public Image JavaDoc getIcon (int type) {
58         if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
59             if (icon == null)
60                 icon = loadImage ("enhydraObject.gif");
61             return icon;
62         } else {
63             if (icon32 == null)
64                 icon32 = loadImage ("enhdyraObject32.gif");
65             return icon32;
66         }
67     }
68
69 }
70
Popular Tags