FileDocCategorySizeDatePackage
ThermostatBeanInfo.javaAPI DocExample1234Wed Jun 04 00:05:28 BST 1997BeansBook.Simulator

ThermostatBeanInfo

public class ThermostatBeanInfo extends SimpleBeanInfo

Fields Summary
Constructors Summary
Methods Summary
public java.beans.BeanDescriptorgetBeanDescriptor()

      // create the bean descriptor
      BeanDescriptor bd = new BeanDescriptor(Thermostat.class);
      
      // set the display name
      bd.setDisplayName("Simulated Thermostat");
      
      // return the object
      return bd;
   
public java.awt.ImagegetIcon(int iconKind)

      // we're only supporting 16x16 color icon
       if (iconKind == BeanInfo.ICON_COLOR_16x16) 
       {
          // load the thermostat.gif file
          java.awt.Image img = loadImage("thermostat.gif");
          
          // return the image
          return img;
       }
       
       // return null for all other icon formats
       return null;