java.lang.Object | +--java.beans.BeanInfo
static int | ICON_COLOR_16x16 Use this as a parameter for the getIcon() command to retrieve a certain type of icon. |
static int | ICON_COLOR_32x32 Use this as a parameter for the getIcon() command to retrieve a certain type of icon. |
static int | ICON_MONO_16x16 Use this as a parameter for the getIcon() command to retrieve a certain type of icon. |
static int | ICON_MONO_32x32 Use this as a parameter for the getIcon() command to retrieve a certain type of icon. |
java.beans.BeanInfo[] | getAdditionalBeanInfo() Get additional BeanInfos representing this Bean. |
java.beans.BeanDescriptor | getBeanDescriptor() Get the general description of this Bean type. |
int | getDefaultEventIndex() Get the "default" event, basically the one a RAD tool user is most likely to select. |
int | getDefaultPropertyIndex() Get the "default" property, basically the one a RAD tool user is most likely to select. |
java.beans.EventSetDescriptor[] | getEventSetDescriptors() Get the events this Bean type fires. |
java.awt.Image | getIcon(int iconType) Get a visual icon for this Bean. |
java.beans.MethodDescriptor[] | getMethodDescriptors() Get the methods this Bean type supports. |
java.beans.PropertyDescriptor[] | getPropertyDescriptors() Get the properties (get/set method pairs) this Bean type supports. |
public static final int ICON_COLOR_16x16
public static final int ICON_COLOR_32x32
public static final int ICON_MONO_16x16
public static final int ICON_MONO_32x32
public BeanInfo[] getAdditionalBeanInfo()
The order of precedence when two pieces of BeanInfo conflict (such as two PropertyDescriptors that have the same name), in order from highest precedence to lowest, is:
getAdditionalBeanInfo()[getAdditionalBeanInfo().length]
getAdditionalBeanInfo()[1]
getAdditionalBeanInfo()[0]
Spec Note: It is possible that
returning null
from this method could
stop Introspection in its tracks, but it is unclear
from the spec whether this is the case.
null
may be returned (see Spec
Note, above).public BeanDescriptor getBeanDescriptor()
public int getDefaultEventIndex()
-1
if there is no default event.public int getDefaultPropertyIndex()
-1
if there is no default event.public EventSetDescriptor[] getEventSetDescriptors()
null
if the
events are to be acquired by Introspection.public Image getIcon(int iconType)
Spec Note: If you do not support the type of icon that is being asked for, but you do support another type, it is unclear whether you should return the other type or not. I would presume not.
iconType
- the type of icon to get (see the
ICON_* constants in this class).public MethodDescriptor[] getMethodDescriptors()
null
if the methods are to be
obtained by Introspection.public PropertyDescriptor[] getPropertyDescriptors()
null
if the properties
are to be obtained by Introspection.
When you have written the class, give it the name
<Bean Class Name>BeanInfo
and place it in the same package as the Bean, or in the bean info search path (see Introspector for information on search paths).A simple note about the way the Introspector interacts with BeanInfo. Introspectors look at a Bean class and determine if there is a BeanInfo class with it. If there is not a BeanInfo class, it will behave as if the BeanInfo class provided was a SimpleBeanInfo class (i.e. it will determine all information automatically).
If there is a BeanInfo class, then any methods that do *not* return null are regarded as providing definitive information about the class and all of its superclasses for those information types. Even if a parent BeanInfo class explicitly returns that information, it will not be used.