Java Platform 1.2

java.beans
Class SimpleBeanInfo

java.lang.Object
  |
  +--java.beans.SimpleBeanInfo

public class SimpleBeanInfo
extends Object
implements BeanInfo

This is a support class to make it easier for people to provide BeanInfo classes.

It defaults to providing "noop" information, and can be selectively overriden to provide more explicit information on chosen topics. When the introspector sees the "noop" values, it will apply low level introspection and design patterns to automatically analyze the target bean.


Constructor Summary
SimpleBeanInfo()
           
 
Method Summary
 BeanInfo[] getAdditionalBeanInfo()
          Claim there are no other relevant BeanInfo objects.
 BeanDescriptor getBeanDescriptor()
          Deny knowledge about the class and customizer of the bean.
 int getDefaultEventIndex()
          Deny knowledge of a default event.
 int getDefaultPropertyIndex()
          Deny knowledge of a default property.
 EventSetDescriptor[] getEventSetDescriptors()
          Deny knowledge of event sets.
 Image getIcon(int iconKind)
          Claim there are no icons available.
 MethodDescriptor[] getMethodDescriptors()
          Deny knowledge of methods.
 PropertyDescriptor[] getPropertyDescriptors()
          Deny knowledge of properties.
 Image loadImage(String resourceName)
          This is a utility method to help in loading icon images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBeanInfo

public SimpleBeanInfo()
Method Detail

getBeanDescriptor

public BeanDescriptor getBeanDescriptor()
Deny knowledge about the class and customizer of the bean. You can override this if you wish to provide explicit info.
Specified by:
getBeanDescriptor in interface BeanInfo

getPropertyDescriptors

public PropertyDescriptor[] getPropertyDescriptors()
Deny knowledge of properties. You can override this if you wish to provide explicit property info.
Specified by:
getPropertyDescriptors in interface BeanInfo

getDefaultPropertyIndex

public int getDefaultPropertyIndex()
Deny knowledge of a default property. You can override this if you wish to define a default property for the bean.
Specified by:
getDefaultPropertyIndex in interface BeanInfo

getEventSetDescriptors

public EventSetDescriptor[] getEventSetDescriptors()
Deny knowledge of event sets. You can override this if you wish to provide explicit event set info.
Specified by:
getEventSetDescriptors in interface BeanInfo

getDefaultEventIndex

public int getDefaultEventIndex()
Deny knowledge of a default event. You can override this if you wish to define a default event for the bean.
Specified by:
getDefaultEventIndex in interface BeanInfo

getMethodDescriptors

public MethodDescriptor[] getMethodDescriptors()
Deny knowledge of methods. You can override this if you wish to provide explicit method info.
Specified by:
getMethodDescriptors in interface BeanInfo

getAdditionalBeanInfo

public BeanInfo[] getAdditionalBeanInfo()
Claim there are no other relevant BeanInfo objects. You may override this if you want to (for example) return a BeanInfo for a base class.
Specified by:
getAdditionalBeanInfo in interface BeanInfo

getIcon

public Image getIcon(int iconKind)
Claim there are no icons available. You can override this if you want to provide icons for your bean.
Specified by:
getIcon in interface BeanInfo

loadImage

public Image loadImage(String resourceName)
This is a utility method to help in loading icon images. It takes the name of a resource file associated with the current object's class file and loads an image object from that file. Typically images will be GIFs.

Parameters:
resourceName - A pathname relative to the directory holding the class file of the current class. For example, "wombat.gif".
Returns:
an image object. May be null if the load failed.

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.