home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / JBuilder / BDK / Win / bdk_sep97.exe / _SETUP.1 / JellyBeanBeanInfo.java < prev    next >
Encoding:
Java Source  |  1997-09-10  |  776 b   |  33 lines

  1.  
  2. /** 
  3.  * The only thing we define in the Juggler BeanInfo is a GIF icon.
  4.  */
  5.  
  6. package sunw.demo.jelly;
  7.  
  8. import java.beans.*;
  9.  
  10. public class JellyBeanBeanInfo extends SimpleBeanInfo {
  11.  
  12.     public java.awt.Image getIcon(int iconKind) {
  13.     if (iconKind == BeanInfo.ICON_COLOR_16x16) {
  14.         java.awt.Image img = loadImage("JellyBeanIconColor16.gif");
  15.         return img;
  16.     }
  17.     if (iconKind == BeanInfo.ICON_COLOR_32x32) {
  18.         java.awt.Image img = loadImage("JellyBeanIconColor32.gif");
  19.         return img;
  20.     }
  21.     if (iconKind == BeanInfo.ICON_MONO_16x16) {
  22.         java.awt.Image img = loadImage("JellyBeanIconMono16.gif");
  23.         return img;
  24.     }
  25.     if (iconKind == BeanInfo.ICON_MONO_32x32) {
  26.         java.awt.Image img = loadImage("JellyBeanIconMono32.gif");
  27.         return img;
  28.     }
  29.     return null;
  30.     }
  31.  
  32. }
  33.