Public Member Functions | |
String | getName () |
String | getDisplayName () |
String | getShortDescription () |
java.awt.Image | getNodeIcon () |
String | getNodeDefaultAction () |
String[] | getNodeActions () |
Boolean | getNodePropertiesCacheable () |
PropertyInfo[] | getPropertyInfo () |
Static Public Attributes | |
static final String | CLASS_PROPERTY_NAME = "class" |
static final String | NAME_PROPERTY_NAME = "name" |
static final String | DISPLAYNAME_PROPERTY_NAME = "displayName" |
static final String | SHORTDESCRIPTION_PROPERTY_NAME = "shortDescription" |
static final String | NODE_ICON_PROPERTY_NAME = "nodeIcon" |
static final String | NODE_DEFAULT_ACTION_PROPERTY_NAME = "nodeDefaultAction" |
static final String | NODE_ACTIONS_PROPERTY_NAME = "nodeActions" |
static final String | NODE_PROPERTIES_CACHEABLE_PROPERTY_NAME = "nodePropertiesCacheable" |
static final String | PROPERTY_INFO_PROPERTY_NAME = "propertyInfo" |
static final String | NAME_PROPERTY_DISPLAY_NAME = "Name" |
static final String | DISPLAYNAME_PROPERTY_DISPLAY_NAME = "Display name" |
static final String | SHORTDESCRIPTION_PROPERTY_DISPLAY_NAME = "Short description" |
This interface defines the additional information a bean may provide in order to interact with the node that represents it.
A node that is built based on a given bean will use introspection to find those methods. The bean can implements any of them and possibly none of them. The node will use whatever information is available to initialize itself. The information non available through those methods will be taken from the BeanInfo or defaulted to a given value.
A bean that aimed to be used in GP Layer can choose one of the following strategies :
BeanSupport
and override any of those methods to return an appropriated value. The methods non overriden are implemented in BeanSupport
and return null BeanSupport
. Since the methods are found by introspection it is not strictly necessary to implement this interface. Nevertheless the interface brings a compile time check that can prove to be useful. It the bean implements the interface it needs to implement all methods are can return null for those where it doesn't want to specify a value. BeanSupport
and provides an explicit BeanInfo
for the specifying additional information. String cern.gp.beans.GPBean.getDisplayName | ( | ) |
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
Implemented in cern.gp.beans.BeanSupport, cern.gp.beans.impl.IntrospectionBasedNodeUpdater, and cern.gp.explorer.NamedBean.
String cern.gp.beans.GPBean.getName | ( | ) |
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()
Implemented in cern.gp.beans.BeanSupport, cern.gp.beans.impl.IntrospectionBasedNodeUpdater, and cern.gp.explorer.NamedBean.
String [] cern.gp.beans.GPBean.getNodeActions | ( | ) |
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())
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
String cern.gp.beans.GPBean.getNodeDefaultAction | ( | ) |
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())
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
java.awt.Image cern.gp.beans.GPBean.getNodeIcon | ( | ) |
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()
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
Boolean cern.gp.beans.GPBean.getNodePropertiesCacheable | ( | ) |
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())
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
PropertyInfo [] cern.gp.beans.GPBean.getPropertyInfo | ( | ) |
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
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
String cern.gp.beans.GPBean.getShortDescription | ( | ) |
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()
Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.
final String cern.gp.beans.GPBean.CLASS_PROPERTY_NAME = "class" [static] |
the class property name
final String cern.gp.beans.GPBean.DISPLAYNAME_PROPERTY_DISPLAY_NAME = "Display name" [static] |
the display name of the display name property
final String cern.gp.beans.GPBean.DISPLAYNAME_PROPERTY_NAME = "displayName" [static] |
the display name property name
Referenced by cern.gp.beans.BeanSupport.fireDisplayNamePropertyChange().
final String cern.gp.beans.GPBean.NAME_PROPERTY_DISPLAY_NAME = "Name" [static] |
the display name of the name property
final String cern.gp.beans.GPBean.NAME_PROPERTY_NAME = "name" [static] |
the name property name
Referenced by cern.gp.beans.BeanSupport.fireNamePropertyChange().
final String cern.gp.beans.GPBean.NODE_ACTIONS_PROPERTY_NAME = "nodeActions" [static] |
the node actions property name
final String cern.gp.beans.GPBean.NODE_DEFAULT_ACTION_PROPERTY_NAME = "nodeDefaultAction" [static] |
the node default action property name
Referenced by cern.gp.beans.BeanSupport.fireNodeDefaultActionPropertyChange().
final String cern.gp.beans.GPBean.NODE_ICON_PROPERTY_NAME = "nodeIcon" [static] |
the node icon property name
Referenced by cern.gp.beans.BeanSupport.fireNodeIconPropertyChange().
final String cern.gp.beans.GPBean.NODE_PROPERTIES_CACHEABLE_PROPERTY_NAME = "nodePropertiesCacheable" [static] |
the node property cacheable property name
final String cern.gp.beans.GPBean.PROPERTY_INFO_PROPERTY_NAME = "propertyInfo" [static] |
the property info property name
final String cern.gp.beans.GPBean.SHORTDESCRIPTION_PROPERTY_DISPLAY_NAME = "Short description" [static] |
the display name of the short description property
final String cern.gp.beans.GPBean.SHORTDESCRIPTION_PROPERTY_NAME = "shortDescription" [static] |
the short description property name
Referenced by cern.gp.beans.BeanSupport.fireShortDescriptionPropertyChange().