Public Member Functions | Protected Member Functions | Static Protected Attributes

cern.gp.beans.BeanInfoSupport Class Reference

Inherits java::beans::SimpleBeanInfo.

List of all members.

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]

Detailed Description

Utility class that provides default implementation and caching for all aspect of the BeanInfo.

Should be subclassed in order to overwrite the protected methods.

Version:
Revision:
1.2
Date:
2006/09/25 08:52:36
Author:
Lionel Mestre

Constructor & Destructor Documentation

cern.gp.beans.BeanInfoSupport.BeanInfoSupport (  ) 

Member Function Documentation

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.

Parameters:
<code>beanClass</code> the class of the bean this BeanInfo is for
Returns:
A EventSetDescriptor for the PropertyChange events.
Exceptions:
IntrospectionException if the EventSetDescriptor cannot be built.
final BeanInfo [] cern.gp.beans.BeanInfoSupport.getAdditionalBeanInfo (  ) 
final BeanDescriptor cern.gp.beans.BeanInfoSupport.getBeanDescriptor (  ) 

Gets the bean's BeanDescriptors.

Returns:
BeanDescriptor describing the editable properties of this bean. May return null if the information should be obtained by automatic analysis.

References cern.gp.beans.BeanInfoSupport.getBeanDescriptorLazy().

BeanDescriptor cern.gp.beans.BeanInfoSupport.getBeanDescriptorLazy (  )  [protected]

Returns the bean descriptor for this bean info.

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:
Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

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.

Returns:
the index of the default event.

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:
Index of default property in the PropertyDescriptor array returned by getPropertyDescriptors.

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.

Returns:
the index of the default property.

Referenced by cern.gp.beans.BeanInfoSupport.getDefaultPropertyIndex().

final EventSetDescriptor [] cern.gp.beans.BeanInfoSupport.getEventSetDescriptors (  ) 

Gets the bean's EventSetDescriptors.

Returns:
An array of EventSetDescriptors describing the kinds of events fired by this bean. May return null if the information should be obtained by automatic analysis.

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

Returns:
the event set descriptors for this bean info.

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.

Parameters:
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.
Returns:
An image object representing the requested icon. May return null if no suitable icon is available.

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.

Returns:
the name of the icon C16 or null if no icon.

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.

Returns:
the name of the icon C32 or null if no icon.

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.

Returns:
the name of the icon M16 or null if no icon.

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.

Returns:
the name of the icon M32 or null if no icon.

Referenced by cern.gp.beans.BeanInfoSupport.getIcon().

final MethodDescriptor [] cern.gp.beans.BeanInfoSupport.getMethodDescriptors (  ) 

Gets the bean's MethodDescriptors.

Returns:
An array of MethodDescriptors describing the methods implemented by this bean. May return null if the information should be obtained by automatic analysis.

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

Returns:
the method descriptors for this bean info.

Referenced by cern.gp.beans.BeanInfoSupport.getMethodDescriptors().

final PropertyDescriptor [] cern.gp.beans.BeanInfoSupport.getPropertyDescriptors (  ) 

Gets the bean's PropertyDescriptors.

Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

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

Returns:
the property descriptors for this bean info.

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

Returns:
the superclass of the class this bean info is for or null.

Referenced by cern.gp.beans.BeanInfoSupport.getAdditionalBeanInfo().


Member Data Documentation

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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties