Inherits java::beans::SimpleBeanInfo.
Public Member Functions | |
BeanInfoSupport () | |
final BeanInfo[] | getAdditionalBeanInfo () |
final BeanDescriptor | getBeanDescriptor () |
final PropertyDescriptor[] | getPropertyDescriptors () |
final EventSetDescriptor[] | getEventSetDescriptors () |
final MethodDescriptor[] | getMethodDescriptors () |
final int | getDefaultPropertyIndex () |
final int | getDefaultEventIndex () |
final java.awt.Image | getIcon (int iconKind) |
Protected Member Functions | |
BeanDescriptor | getBeanDescriptorLazy () |
PropertyDescriptor[] | getPropertyDescriptorsLazy () throws IntrospectionException |
EventSetDescriptor[] | getEventSetDescriptorsLazy () throws IntrospectionException |
MethodDescriptor[] | getMethodDescriptorsLazy () throws IntrospectionException |
String | getIconNameM16 () |
String | getIconNameM32 () |
String | getIconNameC16 () |
String | getIconNameC32 () |
int | getDefaultPropertyIndexLazy () |
int | getDefaultEventIndexLazy () |
Class | getSuperclass () |
EventSetDescriptor | createPropertyChangeEventSet (Class beanClass) throws IntrospectionException |
Static Protected Attributes | |
static final PropertyDescriptor[] | EMPTY_PROPERTY_SET = new PropertyDescriptor[0] |
static final MethodDescriptor[] | EMPTY_METHOD_SET = new MethodDescriptor[0] |
static final EventSetDescriptor[] | EMPTY_EVENT_SET = new EventSetDescriptor[0] |
Utility class that provides default implementation and caching for all aspect of the BeanInfo.
Should be subclassed in order to overwrite the protected methods.
cern.gp.beans.BeanInfoSupport.BeanInfoSupport | ( | ) |
EventSetDescriptor cern.gp.beans.BeanInfoSupport.createPropertyChangeEventSet | ( | Class | beanClass | ) | throws IntrospectionException [protected] |
Returns a new EventSetDescriptor
for PropertyChangeEvent. Call this method inside the method getEventSetDescriptorsLazy
in order to include PropertyChangeEvent in the array of EventSetDescriptor
you return. You do that if the bean class has the methods addPropertyChangeListener
and removePropertyChangeListener
.
<code>beanClass</code> | the class of the bean this BeanInfo is for |
IntrospectionException | if the EventSetDescriptor cannot be built. |
final BeanInfo [] cern.gp.beans.BeanInfoSupport.getAdditionalBeanInfo | ( | ) |
References cern.gp.beans.BeanInfoSupport.getSuperclass().
final BeanDescriptor cern.gp.beans.BeanInfoSupport.getBeanDescriptor | ( | ) |
Gets the bean's BeanDescriptor
s.
References cern.gp.beans.BeanInfoSupport.getBeanDescriptorLazy().
BeanDescriptor cern.gp.beans.BeanInfoSupport.getBeanDescriptorLazy | ( | ) | [protected] |
Returns the bean descriptor for this bean info.
Referenced by cern.gp.beans.BeanInfoSupport.getBeanDescriptor().
final int cern.gp.beans.BeanInfoSupport.getDefaultEventIndex | ( | ) |
A bean may have a "default" event that is the event that will mostly commonly be used by human's when using the bean.
Returns -1 if there is no default event.
References cern.gp.beans.BeanInfoSupport.getDefaultEventIndexLazy().
int cern.gp.beans.BeanInfoSupport.getDefaultEventIndexLazy | ( | ) | [protected] |
Returns the index of the event. Default implementation returns -1.
Referenced by cern.gp.beans.BeanInfoSupport.getDefaultEventIndex().
final int cern.gp.beans.BeanInfoSupport.getDefaultPropertyIndex | ( | ) |
A bean may have a "default" property that is the property that will mostly commonly be initially chosen for update by human's who are customizing the bean.
Returns -1 if there is no default property.
References cern.gp.beans.BeanInfoSupport.getDefaultPropertyIndexLazy().
int cern.gp.beans.BeanInfoSupport.getDefaultPropertyIndexLazy | ( | ) | [protected] |
Returns the index of the default property. Default implementation returns -1.
Referenced by cern.gp.beans.BeanInfoSupport.getDefaultPropertyIndex().
final EventSetDescriptor [] cern.gp.beans.BeanInfoSupport.getEventSetDescriptors | ( | ) |
Gets the bean's EventSetDescriptor
s.
References cern.gp.beans.BeanInfoSupport.EMPTY_EVENT_SET, and cern.gp.beans.BeanInfoSupport.getEventSetDescriptorsLazy().
EventSetDescriptor [] cern.gp.beans.BeanInfoSupport.getEventSetDescriptorsLazy | ( | ) | throws IntrospectionException [protected] |
Returns the event set descriptors for this bean info. Default implementation returns null which means that the Introspector will perform the introspection to get the EventSetDescriptors This method is guarantee to be called once
Referenced by cern.gp.beans.BeanInfoSupport.getEventSetDescriptors().
final java.awt.Image cern.gp.beans.BeanInfoSupport.getIcon | ( | int | iconKind | ) |
This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc. Icon images will typically be GIFs, but may in future include other formats.
Beans aren't required to provide icons and may return null from this method.
There are four possible flavors of icons (16x16 color, 32x32 color, 16x16 mono, 32x32 mono). If a bean choses to only support a single icon we recommend supporting 16x16 color.
We recommend that icons have a "transparent" background so they can be rendered onto an existing background.
iconKind | The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32. |
References cern.gp.beans.BeanInfoSupport.getIconNameC16(), cern.gp.beans.BeanInfoSupport.getIconNameC32(), cern.gp.beans.BeanInfoSupport.getIconNameM16(), and cern.gp.beans.BeanInfoSupport.getIconNameM32().
String cern.gp.beans.BeanInfoSupport.getIconNameC16 | ( | ) | [protected] |
Returns the name of the icon C16. Default implementation returns null.
Referenced by cern.gp.beans.BeanInfoSupport.getIcon().
String cern.gp.beans.BeanInfoSupport.getIconNameC32 | ( | ) | [protected] |
Returns the name of the icon C32. Default implementation returns null.
Referenced by cern.gp.beans.BeanInfoSupport.getIcon().
String cern.gp.beans.BeanInfoSupport.getIconNameM16 | ( | ) | [protected] |
Returns the name of the icon M16. Default implementation returns null.
Referenced by cern.gp.beans.BeanInfoSupport.getIcon().
String cern.gp.beans.BeanInfoSupport.getIconNameM32 | ( | ) | [protected] |
Returns the name of the icon M32. Default implementation returns null.
Referenced by cern.gp.beans.BeanInfoSupport.getIcon().
final MethodDescriptor [] cern.gp.beans.BeanInfoSupport.getMethodDescriptors | ( | ) |
Gets the bean's MethodDescriptor
s.
References cern.gp.beans.BeanInfoSupport.EMPTY_METHOD_SET, and cern.gp.beans.BeanInfoSupport.getMethodDescriptorsLazy().
MethodDescriptor [] cern.gp.beans.BeanInfoSupport.getMethodDescriptorsLazy | ( | ) | throws IntrospectionException [protected] |
Returns the method descriptors for this bean info. Default implementation returns null which means that the Introspector will perform the introspection to get the MethodDescriptors. This method is guarantee to be called once
Referenced by cern.gp.beans.BeanInfoSupport.getMethodDescriptors().
final PropertyDescriptor [] cern.gp.beans.BeanInfoSupport.getPropertyDescriptors | ( | ) |
Gets the bean's PropertyDescriptor
s.
If a property is indexed, then its entry in the result array will belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of getPropertyDescriptors can use "instanceof" to check if a given PropertyDescriptor is an IndexedPropertyDescriptor.
References cern.gp.beans.BeanInfoSupport.EMPTY_PROPERTY_SET, and cern.gp.beans.BeanInfoSupport.getPropertyDescriptorsLazy().
PropertyDescriptor [] cern.gp.beans.BeanInfoSupport.getPropertyDescriptorsLazy | ( | ) | throws IntrospectionException [protected] |
Returns the property descriptors for this bean info. Default implementation returns null which means that the Introspector will perform the introspection to get the PropertyDescriptors This method is guarantee to be called once
Referenced by cern.gp.beans.BeanInfoSupport.getPropertyDescriptors().
Class cern.gp.beans.BeanInfoSupport.getSuperclass | ( | ) | [protected] |
Returns the superclass of the class this bean info is for. This is used in order to look for additional BeanInfo. Default implementation returns null which means that there is no additional BeanInfo
Referenced by cern.gp.beans.BeanInfoSupport.getAdditionalBeanInfo().
final EventSetDescriptor [] cern.gp.beans.BeanInfoSupport.EMPTY_EVENT_SET = new EventSetDescriptor[0] [static, protected] |
Empty array of event set descriptor that you can return in getEventSetDescriptorsLazy
in order not to have any event set and to prevent the Introspector to introspect the event set from the bean
Referenced by cern.gp.beans.BeanInfoSupport.getEventSetDescriptors().
final MethodDescriptor [] cern.gp.beans.BeanInfoSupport.EMPTY_METHOD_SET = new MethodDescriptor[0] [static, protected] |
Empty array of method descriptors that you can return in getMethodDescriptorsLazy
in order not to have any method descriptor and to prevent the Introspector to introspect the methods from the bean
Referenced by cern.gp.beans.BeanInfoSupport.getMethodDescriptors().
final PropertyDescriptor [] cern.gp.beans.BeanInfoSupport.EMPTY_PROPERTY_SET = new PropertyDescriptor[0] [static, protected] |
Empty array of property set that you can return in getPropertyDescriptorsLazy
in order not to have any property and to prevent the Introspector to introspect the properties from the bean
Referenced by cern.gp.beans.BeanInfoSupport.getPropertyDescriptors().