KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nqadmin > swingSet > SSComboBoxBeanInfo


1 /* $Id: SSComboBoxBeanInfo.java,v 1.4 2005/02/07 19:55:51 yoda2 Exp $
2  *
3  * Tab Spacing = 4
4  *
5  * Copyright (c) 2005, The Pangburn Company and Prasanth R. Pasala.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer. Redistributions in binary
13  * form must reproduce the above copyright notice, this list of conditions and
14  * the following disclaimer in the documentation and/or other materials
15  * provided with the distribution. The names of its contributors may not be
16  * used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  *
31  */

32  
33 package com.nqadmin.swingSet;
34
35 import java.beans.*;
36
37 /**
38  * SSComboBoxBeanInfo.java
39  *<p>
40  * SwingSet - Open Toolkit For Making Swing Controls Database-Aware
41  *<p><pre>
42  * Contains & controls various bean properties for SSComboBox.
43  *</pre><p>
44  * @author $Author: yoda2 $
45  * @version $Revision: 1.4 $
46  */

47  public class SSComboBoxBeanInfo extends SimpleBeanInfo {
48
49     /**
50      * Provides the icon representation for the related bean.
51      *
52      * @param _iconKind The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32.
53      *
54      * @return An image object representing the requested icon. May return null if no suitable icon is available.
55      */

56     public java.awt.Image JavaDoc getIcon(int _iconKind) {
57         
58         if (_iconKind == BeanInfo.ICON_MONO_16x16 ||
59             _iconKind == BeanInfo.ICON_COLOR_16x16 )
60         {
61             java.awt.Image JavaDoc img = loadImage("/images/icons/sscombobox.gif");
62             return img;
63         }
64         if (_iconKind == BeanInfo.ICON_MONO_32x32 ||
65             _iconKind == BeanInfo.ICON_COLOR_32x32 )
66         {
67             java.awt.Image JavaDoc img = loadImage("/images/icons/sscombobox32.gif");
68             return img;
69         }
70         
71         return null;
72         
73     } // end public java.awt.Image getIcon(int _iconKind) {
74

75 }
76
77 /*
78  * $Log: SSComboBoxBeanInfo.java,v $
79  * Revision 1.4 2005/02/07 19:55:51 yoda2
80  * Fixing JavaDoc errors with _iconKind parameter name.
81  *
82  * Revision 1.3 2005/02/04 22:41:06 yoda2
83  * Updated Copyright info.
84  *
85  * Revision 1.2 2005/02/02 23:18:02 yoda2
86  * Fixed log tag.
87  *
88  */

89
Popular Tags