home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / JBuilder / BDK / Win / bdk_sep97.exe / _SETUP.1 / ComponentBeanInfo.java < prev    next >
Encoding:
Java Source  |  1997-06-05  |  1.8 KB  |  55 lines

  1. /*
  2.  * @(#)ComponentBeanInfo.java    1.9 96/12/18  
  3.  * 
  4.  * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion bdk_beta
  20.  * 
  21.  */
  22.  
  23. package sun.beans.infos;
  24.  
  25. import java.beans.*;
  26.  
  27. /**
  28.  * BeanInfo descriptor for a standard AWT component.
  29.  */
  30.  
  31. public class ComponentBeanInfo extends SimpleBeanInfo {
  32.     private static final Class beanClass = java.awt.Component.class;
  33.  
  34.     public PropertyDescriptor[] getPropertyDescriptors() {
  35.         try {
  36.             PropertyDescriptor 
  37.               name = new PropertyDescriptor("name",       beanClass),
  38.         background = new PropertyDescriptor("background", beanClass),
  39.             foreground = new PropertyDescriptor("foreground", beanClass),
  40.               font = new PropertyDescriptor("font",       beanClass),
  41.            enabled = new PropertyDescriptor("enabled",    beanClass),
  42.            visible = new PropertyDescriptor("visible",    beanClass);
  43.         enabled.setExpert(true);
  44.             visible.setHidden(true);
  45.       
  46.             PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible};
  47.             return rv;
  48.         } catch (IntrospectionException e) {
  49.             throw new Error(e.toString());
  50.         }
  51.     }
  52. }
  53.  
  54.  
  55.