- 
- All Known Subinterfaces:
- BeanContextServiceProviderBeanInfo
 - All Known Implementing Classes:
- SimpleBeanInfo
 
 public interface BeanInfoUse theBeanInfointerface to create aBeanInfoclass and provide explicit information about the methods, properties, events, and other features of your beans.When developing your bean, you can implement the bean features required for your application task omitting the rest of the BeanInfofeatures. They will be obtained through the automatic analysis by using the low-level reflection of the bean methods and applying standard design patterns. You have an opportunity to provide additional bean information through various descriptor classes.See the SimpleBeanInfoclass that is a convenient basic class forBeanInfoclasses. You can override the methods and properties of theSimpleBeanInfoclass to define specific information.See also the Introspectorclass to learn more about bean behavior.- Since:
- 1.1
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intICON_COLOR_16x16Constant to indicate a 16 x 16 color icon.static intICON_COLOR_32x32Constant to indicate a 32 x 32 color icon.static intICON_MONO_16x16Constant to indicate a 16 x 16 monochrome icon.static intICON_MONO_32x32Constant to indicate a 32 x 32 monochrome icon.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description BeanInfo[]getAdditionalBeanInfo()This method enables the currentBeanInfoobject to return an arbitrary collection of otherBeanInfoobjects that provide additional information about the current bean.BeanDescriptorgetBeanDescriptor()Returns the bean descriptor that provides overall information about the bean, such as its display name or its customizer.intgetDefaultEventIndex()A bean may have a default event typically applied when this bean is used.intgetDefaultPropertyIndex()A bean may have a default property commonly updated when this bean is customized.EventSetDescriptor[]getEventSetDescriptors()Returns the event descriptors of the bean that define the types of events fired by this bean.ImagegetIcon(int iconKind)Returns an image that can be used to represent the bean in toolboxes or toolbars.MethodDescriptor[]getMethodDescriptors()Returns the method descriptors of the bean that define the externally visible methods supported by this bean.PropertyDescriptor[]getPropertyDescriptors()Returns descriptors for all properties of the bean.
 
- 
- 
- 
Field Detail- 
ICON_COLOR_16x16static final int ICON_COLOR_16x16 Constant to indicate a 16 x 16 color icon.- See Also:
- Constant Field Values
 
 - 
ICON_COLOR_32x32static final int ICON_COLOR_32x32 Constant to indicate a 32 x 32 color icon.- See Also:
- Constant Field Values
 
 - 
ICON_MONO_16x16static final int ICON_MONO_16x16 Constant to indicate a 16 x 16 monochrome icon.- See Also:
- Constant Field Values
 
 - 
ICON_MONO_32x32static final int ICON_MONO_32x32 Constant to indicate a 32 x 32 monochrome icon.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getBeanDescriptorBeanDescriptor getBeanDescriptor() Returns the bean descriptor that provides overall information about the bean, such as its display name or its customizer.- Returns:
- a BeanDescriptorobject, ornullif the information is to be obtained through the automatic analysis
 
 - 
getEventSetDescriptorsEventSetDescriptor[] getEventSetDescriptors() Returns the event descriptors of the bean that define the types of events fired by this bean.- Returns:
- an array of EventSetDescriptorobjects, ornullif the information is to be obtained through the automatic analysis
 
 - 
getDefaultEventIndexint getDefaultEventIndex() A bean may have a default event typically applied when this bean is used.- Returns:
- index of the default event in the EventSetDescriptorarray returned by thegetEventSetDescriptorsmethod, or -1 if there is no default event
 
 - 
getPropertyDescriptorsPropertyDescriptor[] getPropertyDescriptors() Returns descriptors for all properties of the bean.If a property is indexed, then its entry in the result array belongs to the IndexedPropertyDescriptorsubclass of thePropertyDescriptorclass. A client of thegetPropertyDescriptorsmethod can use theinstanceofoperator to check whether a givenPropertyDescriptoris anIndexedPropertyDescriptor.- Returns:
- an array of PropertyDescriptorobjects, ornullif the information is to be obtained through the automatic analysis
 
 - 
getDefaultPropertyIndexint getDefaultPropertyIndex() A bean may have a default property commonly updated when this bean is customized.- Returns:
- index of the default property in the PropertyDescriptorarray returned by thegetPropertyDescriptorsmethod, or -1 if there is no default property
 
 - 
getMethodDescriptorsMethodDescriptor[] getMethodDescriptors() Returns the method descriptors of the bean that define the externally visible methods supported by this bean.- Returns:
- an array of MethodDescriptorobjects, ornullif the information is to be obtained through the automatic analysis
 
 - 
getAdditionalBeanInfoBeanInfo[] getAdditionalBeanInfo() This method enables the currentBeanInfoobject to return an arbitrary collection of otherBeanInfoobjects that provide additional information about the current bean.If there are conflicts or overlaps between the information provided by different BeanInfoobjects, the currentBeanInfoobject takes priority over the additionalBeanInfoobjects. Array elements with higher indices take priority over the elements with lower indices.- Returns:
- an array of BeanInfoobjects, ornullif there are no additionalBeanInfoobjects
 
 - 
getIconImage getIcon(int iconKind) Returns an image that can be used to represent the bean in toolboxes or toolbars.There are four possible types of icons: 16 x 16 color, 32 x 32 color, 16 x 16 mono, and 32 x 32 mono. If you implement a bean so that it supports a single icon, it is recommended to use 16 x 16 color. Another recommendation is to set a transparent background for the icons. - Parameters:
- iconKind- the kind of icon requested
- Returns:
- an image object representing the requested icon,
                   or nullif no suitable icon is available
- See Also:
- ICON_COLOR_16x16,- ICON_COLOR_32x32,- ICON_MONO_16x16,- ICON_MONO_32x32
 
 
- 
 
-