Public Member Functions | Static Public Attributes

cern.gp.beans.GPBean Interface Reference

Inheritance diagram for cern.gp.beans.GPBean:
cern.gp.beans.BeanSupport cern.gp.beans.impl.NodeUpdater cern.gp.explorer.NamedBean cern.gp.beans.impl.IntrospectionBasedNodeUpdater cern.gp.beans.impl.ListenerBasedNodeUpdater

List of all members.

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"

Detailed 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 :

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

Member Function Documentation

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.

  • Property name : displayName
  • Visibility : normal (visible in a property sheet)
  • Default value (when null is returned from this method) : if getName() is available it is used instead of getDisplayName(), else beanInfo.getBeanDescriptor().getDisplayName() is used
Returns:
the internal display name of the associated bean or null

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.

  • Property name : name
  • Visibility : normal (visible in a property sheet)
  • Default value (when null is returned from this method) : a unique name generated using BeanUtils. generateUniqueBeanName()
Returns:
the internal name of the associated bean or null.

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.

  • Property name : nodeActions
  • Visibility : hidden (not visible in a property sheet)
  • Default value (when null is returned from this method) : use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.getActions(beanInfo.getBeanDescriptor())
Returns:
an array of qualified name of actions for a node representing the bean.

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.

  • Property name : nodeDefaultAction
  • Visibility : hidden
  • Default value (when null is returned from this method) : use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.getDefaultAction(beanInfo.getBeanDescriptor())
Returns:
the qualified name of the default action for the node or null representing the associated bean.

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.

  • Property name : nodeIcon
  • Visibility : hidden (not visible in a property sheet)
  • Default value (when null is returned from this method) : beanInfo.getIcon()
Returns:
the icon in 16x16 size used to display the node representing the associated bean or null

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

  • Property name : nodePropertiesCacheable
  • Visibility : hidden (not visible in a property sheet)
  • Default value (when null is returned from this method) : use the possible tagging of the BeanDescriptor of the BeanInfo : BeanTagger.isCacheable(beanInfo.getBeanDescriptor())
Returns:
true is the value of the properties can be cached in the node, false else or null for default behavior

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.

  • Property name : propertyInfo
  • Visibility : hidden (not visible in a property sheet)
  • Default value (when null is returned from this method) : use PropertyDescriptors from BeanInfo
Returns:
true is the value of the properties can be cached in the node, false else or null for default behavior

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.

  • Property name : shortDescription
  • Visibility : normal (visible in a property sheet)
  • Default value (when null is returned from this method) : beanInfo.getBeanDescriptor(). getShortDescription()
Returns:
a short description of the associated bean or null

Implemented in cern.gp.beans.BeanSupport, and cern.gp.beans.impl.IntrospectionBasedNodeUpdater.


Member Data Documentation

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


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