java.beans
Class SimpleBeanInfo
java.lang.Object
|
+--java.beans.SimpleBeanInfo
All Implemented Interfaces:
BeanInfo
SimpleBeanInfo is a class you may extend to more easily
provide select information to the Introspector. It
implements all of the methods in BeanInfo by returning
null and forces the Introspector to behave exactly as
if there were no BeanInfo class at all (Introspecting
everything).
Overriding one or two of these functions
to give explicit information on only those things you
wish to give explicit information is perfectly safe,
and even desirable.
See the BeanInfo class for information on what the
various methods actually do.
Since:Author:See Also:
getAdditionalBeanInfo
public BeanInfo[] getAdditionalBeanInfo()
Tell the Introspector to go look for other BeanInfo
itself.
Returns:
getBeanDescriptor
public BeanDescriptor getBeanDescriptor()
Force Introspection of the general bean info.
Returns:
getDefaultEventIndex
public int getDefaultEventIndex()
Say that there is no "default" event set.
Returns:
getDefaultPropertyIndex
public int getDefaultPropertyIndex()
Say that there is no "default" property.
Returns:
getEventSetDescriptors
public EventSetDescriptor[] getEventSetDescriptors()
Force Introspection of the events this Bean type
fires.
Returns:
getIcon
public Image getIcon(int iconType)
Say that this Bean has no icons.
Parameters:
Returns:
getMethodDescriptors
public MethodDescriptor[] getMethodDescriptors()
Force Introspection of the Bean's methods.
Returns:
getPropertyDescriptors
public PropertyDescriptor[] getPropertyDescriptors()
Force Introspection of the Bean properties.
Returns:
loadImage
public Image loadImage(java.lang.String location)
Helper method to load an image using the Bean class
getResource() method on the BeanInfo class (using
getClass(), since you'll extend this class to get
the BeanInfo). Basically it's assumed that the Bean
and its BeanInfo are both loaded by the same
ClassLoader, generally a reasonable assumption.
Parameters:
Returns:
Overriding one or two of these functions to give explicit information on only those things you wish to give explicit information is perfectly safe, and even desirable.
See the BeanInfo class for information on what the various methods actually do.