/Users/lyon/j4p/src/bookExamples/ch34BeanProperties/Bean1BeanInfo.java
|
1 /**
2 * Bean1BeanInfo.java
3 *
4 * Description: BeanInfo for class Bean1
5 * @author
6 * @version
7 */
8
9 package bookExamples.ch34BeanProperties;
10
11
12 /**
13 * Bean1BeanInfo just gives the Bean1 bean its icons.
14 *
15 * @see Bean1
16 */
17 public class Bean1BeanInfo extends java.beans.SimpleBeanInfo {
18
19 /* Small icon is in Bean1.gif
20 * Large icon is in Bean1L.gif
21 * [It is expected that the contents of the icon files will be changed to suit your bean.]
22 */
23
24 public java.awt.Image getIcon(int iconKind) {
25 java.awt.Image icon = null;
26 switch (iconKind) {
27 case ICON_COLOR_16x16:
28 icon = loadImage("Bean1.gif");
29 break;
30 case ICON_COLOR_32x32:
31 icon = loadImage("Bean1L.gif");
32 break;
33 default:
34 break;
35 }
36 return icon;
37 }
38 }
39
40 /* @(#)Bean1BeanInfo.java */
41