

Classes | |
| class | InternalPropertyDescriptor |
| class | PropertyChangeListenerImpl |
Public Member Functions | |
| boolean | isPropertyHidden (PropertyDescriptor propertyDescriptor) |
| String | getName () |
| String | getDisplayName () |
| String | getShortDescription () |
| java.awt.Image | getNodeIcon () |
| String | getNodeDefaultAction () |
| String[] | getNodeActions () |
| Boolean | getNodePropertiesCacheable () |
| PropertyInfo[] | getPropertyInfo () |
Protected Member Functions | |
| IntrospectionBasedNodeUpdater (Object bean) throws IntrospectionException | |
| IntrospectionBasedNodeUpdater (Object bean, BeanInfo beanInfo) throws IntrospectionException | |
| IntrospectionBasedNodeUpdater (Object bean, BeanInfo beanInfo, Class targetClass) throws IntrospectionException | |
| abstract void | firePropertyChange (String propertyName, Object oldValue, Object newValue) |
| abstract void | fireNameChange (String newName) |
| abstract void | fireDisplayNameChange (String newDisplayName) |
| abstract void | fireShortDescriptionChange (String newShortDescription) |
| abstract void | fireNodeDefaultActionChange (String newDefaultAction) |
| abstract void | fireNodeIconChange (java.awt.Image newIcon) |
| final void | removePropertyChangeListener () |
| final boolean | hasRegisteredListener () |
Private Member Functions | |
| final void | initialize (Object bean, BeanInfo beanInfo, Class targetClass) |
| void | findPropertyChangeListenerMethods () |
| final String | getStringFromGetterMethod (Method getterMethod) |
| final Object | getObjectFromGetterMethod (Method getterMethod) |
Static Private Member Functions | |
| static Method | findGetterMethod (Class beanClass, InternalPropertyDescriptor propertyDesc) |
Private Attributes | |
| Method | _nameGetter |
| Method | _displayNameGetter |
| Method | _shortDescriptionGetter |
| Method | _nodeIconGetter |
| Method | _nodeDefaultActionGetter |
| Method | _nodeActionsGetter |
| Method | _nodePropertiesCacheableGetter |
| Method | _propertyInfoGetter |
| boolean | _shouldHideName |
| boolean | _shouldHideDisplayName |
| boolean | _shouldHideShortDescription |
| Method | _removePropertyChangeListenerMethod |
| PropertyChangeListener | _propertyChangeListener |
| Object | _bean |
| BeanInfo | _beanInfo |
| boolean | _hasRegisteredListener |
Static Private Attributes | |
| static final InternalPropertyDescriptor | NAME_DESC |
| static final InternalPropertyDescriptor | DISPLAYNAME_DESC |
| static final InternalPropertyDescriptor | SHORTDESCRIPTION_DESC |
| static final InternalPropertyDescriptor | NODE_ICON_DESC |
| static final InternalPropertyDescriptor | NODE_DEFAULT_ACTION_DESC |
| static final InternalPropertyDescriptor | NODE_ACTIONS_DESC |
| static final InternalPropertyDescriptor | NODE_PROPERTIES_CACHEABLE_DESC |
| static final InternalPropertyDescriptor | PROPERTY_INFO_DESC |
| static final Class[] | EMPTY_CLASS_ARRAY = new Class[0] |
<font size="-1" color="#FF0000">**For internal use only** </font> Provides support for implementing a NodeUpdater based on introspection.
For beans that do not implement any interface we use the JavaBeans specification for doing the introspection of the properties we are interested in. Those properties should have at least an associated getter. The list of properties we look for is defined by the GPBean interface.
This NodeUpdater also supports the BeanInfo tagging done through the BeanTagger class. Tagging a BeanInfo allows to add information that is not directly supported by the BeanInfo. Three tags are recognized by BeanNode :
BeanTagger.getActions() to get the actions for this node. By default no action is added. BeanTagger.getDefaultAction() to get the default action for this node. By default the Property action is used. BeanTagger.isCacheable() to get whether the value of the properties of the bean can be cached or not. | cern::gp::beans::impl::IntrospectionBasedNodeUpdater::IntrospectionBasedNodeUpdater | ( | Object | bean | ) | throws IntrospectionException [inline, protected] |
Creates a new GuiUpdaterIntrospector
References initialize().
| cern::gp::beans::impl::IntrospectionBasedNodeUpdater::IntrospectionBasedNodeUpdater | ( | Object | bean, | |
| BeanInfo | beanInfo | |||
| ) | throws IntrospectionException [inline, protected] |
Creates a new GuiUpdaterIntrospector
| cern::gp::beans::impl::IntrospectionBasedNodeUpdater::IntrospectionBasedNodeUpdater | ( | Object | bean, | |
| BeanInfo | beanInfo, | |||
| Class | targetClass | |||
| ) | throws IntrospectionException [inline, protected] |
Creates a new GuiUpdaterIntrospector
References initialize().
| static Method cern::gp::beans::impl::IntrospectionBasedNodeUpdater::findGetterMethod | ( | Class | beanClass, | |
| InternalPropertyDescriptor | propertyDesc | |||
| ) | [inline, static, private] |
Finds getter methods for the given getter name. The return type of the getter must be of type String
References EMPTY_CLASS_ARRAY, cern::gp::beans::impl::IntrospectionBasedNodeUpdater::InternalPropertyDescriptor::getterName, and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::InternalPropertyDescriptor::type.
Referenced by initialize().
| void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::findPropertyChangeListenerMethods | ( | ) | [inline, private] |
References _bean, _beanInfo, _hasRegisteredListener, _propertyChangeListener, and _removePropertyChangeListenerMethod.
Referenced by initialize().
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::fireDisplayNameChange | ( | String | newDisplayName | ) | [protected, pure virtual] |
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::fireNameChange | ( | String | newName | ) | [protected, pure virtual] |
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::fireNodeDefaultActionChange | ( | String | newDefaultAction | ) | [protected, pure virtual] |
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::fireNodeIconChange | ( | java.awt.Image | newIcon | ) | [protected, pure virtual] |
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::firePropertyChange | ( | String | propertyName, | |
| Object | oldValue, | |||
| Object | newValue | |||
| ) | [protected, pure virtual] |
| abstract void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::fireShortDescriptionChange | ( | String | newShortDescription | ) | [protected, pure virtual] |
| String cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getDisplayName | ( | ) | [inline] |
Returns the internal display name of the associated bean. If null is returned a default name will be used.
displayName normal (visible in a property sheet) if getName() is available it is used instead of getDisplayName(), else beanInfo.getBeanDescriptor().getDisplayName() is used Implements cern::gp::beans::GPBean.
References _beanInfo, _displayNameGetter, and getStringFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization(), and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PropertyChangeListenerImpl::propertyChange().
| String cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getName | ( | ) | [inline] |
Returns the internal name of the associated bean. If null is returned a default name will be used.
name normal (visible in a property sheet) a unique name generated using BeanUtils. generateUniqueBeanName() Implements cern::gp::beans::GPBean.
References _bean, _nameGetter, and getStringFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization(), and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PropertyChangeListenerImpl::propertyChange().
| String [] cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeActions | ( | ) | [inline] |
Returns an array of qualified name of actions for the node representing the associated bean. Null can be used in the array to represent a separator.
nodeActions hidden (not visible in a property sheet) use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.getActions(beanInfo.getBeanDescriptor()) Implements cern::gp::beans::GPBean.
References _beanInfo, _nodeActionsGetter, and getObjectFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::createActions().
| String cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeDefaultAction | ( | ) | [inline] |
Returns the qualified name of the default action for the node representing the associated bean. The default action is the one triggered when the user double-clic on the node. If null is returned a default default action will be used.
nodeDefaultAction hidden use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.getDefaultAction(beanInfo.getBeanDescriptor()) Implements cern::gp::beans::GPBean.
References _beanInfo, _nodeDefaultActionGetter, and getStringFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization(), and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PropertyChangeListenerImpl::propertyChange().
| java.awt.Image cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeIcon | ( | ) | [inline] |
Returns the icon in 16x16 size used to display the node representing the associated bean. If null is returned a default icon will be used.
nodeIcon hidden (not visible in a property sheet) beanInfo.getIcon() Implements cern::gp::beans::GPBean.
References _beanInfo, _nodeIconGetter, and getObjectFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization(), and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PropertyChangeListenerImpl::propertyChange().
| Boolean cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodePropertiesCacheable | ( | ) | [inline] |
Returns true if the value of the properties can be cached in the node, false if they cannot or null if no behavior is specified. The default behavior is not to cache the value of the properties.
If the value of a property is not cached, the getter method will be invoked whenever the node need to get the value of the property.
If the value of the property is cached, the getter method for the property will only be invoked once to read the value. Then, whenever the node need the value of the property it will used the cached one until a PropertyChangeEvent for the property (or for all properties) is fired.
Caching values can improve performance greatly but it adds one more responsibility on the developer who has to fire PropertyChangeEvent whenever the property values change.
This property gives the caching strategy for all properties. It is possible to override the bean level caching strategy at the property level by using the property information getPropertyInformation().
nodePropertiesCacheable hidden (not visible in a property sheet) use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.isCacheable(beanInfo.getBeanDescriptor()) Implements cern::gp::beans::GPBean.
References _beanInfo, _nodePropertiesCacheableGetter, and getObjectFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization().
| final Object cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getObjectFromGetterMethod | ( | Method | getterMethod | ) | [inline, private] |
References _bean.
Referenced by getNodeActions(), getNodeIcon(), getNodePropertiesCacheable(), and getPropertyInfo().
| PropertyInfo [] cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getPropertyInfo | ( | ) | [inline] |
Returns an array of PropertyInfo specifying information on some properties.
Each PropertyInfo of this array defines information for one property of this bean. Defining a PropertyInfo for a given property is usefull when there is no explicit BeanInfo for the bean and when the property have non default characteristics such as, for instance, a specific PropertyEditor.
propertyInfo hidden (not visible in a property sheet) use PropertyDescriptors from BeanInfo Implements cern::gp::beans::GPBean.
References _nodePropertiesCacheableGetter, _propertyInfoGetter, and getObjectFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization().
| String cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getShortDescription | ( | ) | [inline] |
Returns a short description of the associated bean (used in tooltip for instance). If null is returned a default description will be used.
shortDescription normal (visible in a property sheet) beanInfo.getBeanDescriptor(). getShortDescription() Implements cern::gp::beans::GPBean.
References _beanInfo, _shortDescriptionGetter, and getStringFromGetterMethod().
Referenced by cern::gp::nodes::impl::BeanNode::initialization(), and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PropertyChangeListenerImpl::propertyChange().
| final String cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getStringFromGetterMethod | ( | Method | getterMethod | ) | [inline, private] |
References _bean.
Referenced by getDisplayName(), getName(), getNodeDefaultAction(), getShortDescription(), and initialize().
| final boolean cern::gp::beans::impl::IntrospectionBasedNodeUpdater::hasRegisteredListener | ( | ) | [inline, protected] |
References _hasRegisteredListener.
Referenced by cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::hasRegisteredListenerInternal().
| final void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::initialize | ( | Object | bean, | |
| BeanInfo | beanInfo, | |||
| Class | targetClass | |||
| ) | [inline, private] |
References _bean, _beanInfo, _displayNameGetter, _nameGetter, _nodeActionsGetter, _nodeDefaultActionGetter, _nodeIconGetter, _nodePropertiesCacheableGetter, _propertyInfoGetter, _shortDescriptionGetter, _shouldHideDisplayName, _shouldHideName, _shouldHideShortDescription, DISPLAYNAME_DESC, findGetterMethod(), findPropertyChangeListenerMethods(), getStringFromGetterMethod(), NAME_DESC, NODE_ACTIONS_DESC, NODE_DEFAULT_ACTION_DESC, NODE_ICON_DESC, NODE_PROPERTIES_CACHEABLE_DESC, PROPERTY_INFO_DESC, and SHORTDESCRIPTION_DESC.
Referenced by IntrospectionBasedNodeUpdater().
| boolean cern::gp::beans::impl::IntrospectionBasedNodeUpdater::isPropertyHidden | ( | PropertyDescriptor | propertyDescriptor | ) | [inline] |
Returns whether or not the property having the given PropertyDescriptor is a property supported by this introspector that should automatically be hidden. In the case the property is supported and should not be hidden, the PropertyDescriptor will be updated with the display name of the property.
| propertyName | the property name to check |
References _shouldHideDisplayName, _shouldHideName, and _shouldHideShortDescription.
Referenced by cern::gp::nodes::impl::BeanNode::hideUnwantedPropertyDescriptors().
| final void cern::gp::beans::impl::IntrospectionBasedNodeUpdater::removePropertyChangeListener | ( | ) | [inline, protected] |
Object cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_bean [private] |
BeanInfo cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_beanInfo [private] |
bean info
Referenced by findPropertyChangeListenerMethods(), getDisplayName(), getNodeActions(), getNodeDefaultAction(), getNodeIcon(), getNodePropertiesCacheable(), getShortDescription(), and initialize().
Referenced by getDisplayName(), and initialize().
Referenced by findPropertyChangeListenerMethods(), and hasRegisteredListener().
Method cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_nameGetter [private] |
Referenced by getName(), and initialize().
Referenced by getNodeActions(), and initialize().
Referenced by getNodeDefaultAction(), and initialize().
Referenced by getNodeIcon(), and initialize().
Method cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_nodePropertiesCacheableGetter [private] |
Referenced by getNodePropertiesCacheable(), getPropertyInfo(), and initialize().
PropertyChangeListener cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_propertyChangeListener [private] |
listener for properties
Referenced by findPropertyChangeListenerMethods(), and removePropertyChangeListener().
Referenced by getPropertyInfo(), and initialize().
Method cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_removePropertyChangeListenerMethod [private] |
remove PropertyChangeListener method
Referenced by findPropertyChangeListenerMethods(), and removePropertyChangeListener().
Referenced by getShortDescription(), and initialize().
Referenced by initialize(), and isPropertyHidden().
boolean cern::gp::beans::impl::IntrospectionBasedNodeUpdater::_shouldHideName [private] |
Referenced by initialize(), and isPropertyHidden().
Referenced by initialize(), and isPropertyHidden().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::DISPLAYNAME_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.DISPLAYNAME_PROPERTY_NAME, "getDisplayName", String.class)
Referenced by initialize().
final Class [] cern::gp::beans::impl::IntrospectionBasedNodeUpdater::EMPTY_CLASS_ARRAY = new Class[0] [static, private] |
Referenced by findGetterMethod().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::NAME_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.NAME_PROPERTY_NAME, "getName", String.class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::NODE_ACTIONS_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.NODE_ACTIONS_PROPERTY_NAME, "getNodeActions", String[].class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::NODE_DEFAULT_ACTION_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.NODE_DEFAULT_ACTION_PROPERTY_NAME, "getNodeDefaultAction", String.class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::NODE_ICON_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.NODE_ICON_PROPERTY_NAME, "getNodeIcon", java.awt.Image.class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::NODE_PROPERTIES_CACHEABLE_DESC [static, private] |
new InternalPropertyDescriptor(
GPBean.NODE_PROPERTIES_CACHEABLE_PROPERTY_NAME,
"getNodePropertiesCacheable",
Boolean.class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::PROPERTY_INFO_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.PROPERTY_INFO_PROPERTY_NAME, "getPropertyInfo", PropertyInfo[].class)
Referenced by initialize().
final InternalPropertyDescriptor cern::gp::beans::impl::IntrospectionBasedNodeUpdater::SHORTDESCRIPTION_DESC [static, private] |
new InternalPropertyDescriptor(GPBean.SHORTDESCRIPTION_PROPERTY_NAME, "getShortDescription", String.class)
Referenced by initialize().
1.6.2