home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / ActiveX / JChart / JChartBeanInfo.java < prev    next >
Encoding:
Java Source  |  2000-05-04  |  1.3 KB  |  51 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. //
  3. //  JChartBeanInfo.java
  4. //
  5. // This provides the information about the chart beans properties and
  6. // custom property editors.
  7. //
  8. //  (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  9. //
  10. ///////////////////////////////////////////////////////////////////////////
  11.  
  12. import java.beans.*;
  13. import java.awt.*;
  14.  
  15. //
  16. //
  17. // JChartBeanInfo
  18. //
  19. //
  20. public class JChartBeanInfo extends SimpleBeanInfo
  21. {
  22.     /**
  23.      * Return the icon for this bean
  24.      * 
  25.      * @param   int     whether 16x16 pixels or 32x32
  26.      * @return  Image   The image icon for the calendar
  27.      */
  28.     public Image getIcon(int iconKind)
  29.     {
  30.         if(iconKind == BeanInfo.ICON_COLOR_16x16)        
  31.             return loadImage("JChartIcon16.gif");
  32.         
  33.         if(iconKind == BeanInfo.ICON_COLOR_32x32)
  34.             return loadImage("JChartIcon32.gif");
  35.  
  36.         return null;
  37.     }
  38.  
  39.  
  40.     /**
  41.      * The Bean descriptor is used for specifying the customizer for the bean
  42.      * @return  BeanDescriptor  The descriptor of the chart bean
  43.      */
  44.     public BeanDescriptor getBeanDescriptor()
  45.     {
  46.         return new BeanDescriptor(JChart.class, JChartCustomizer.class);
  47.     }
  48.  
  49. }
  50.  
  51.