public interface GPBean
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 nullBeanSupport. 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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_PROPERTY_NAME
the class property name
|
static java.lang.String |
DISPLAYNAME_PROPERTY_DISPLAY_NAME
the display name of the display name property
|
static java.lang.String |
DISPLAYNAME_PROPERTY_NAME
the display name property name
|
static java.lang.String |
NAME_PROPERTY_DISPLAY_NAME
the display name of the name property
|
static java.lang.String |
NAME_PROPERTY_NAME
the name property name
|
static java.lang.String |
NODE_ACTIONS_PROPERTY_NAME
the node actions property name
|
static java.lang.String |
NODE_DEFAULT_ACTION_PROPERTY_NAME
the node default action property name
|
static java.lang.String |
NODE_ICON_PROPERTY_NAME
the node icon property name
|
static java.lang.String |
NODE_PROPERTIES_CACHEABLE_PROPERTY_NAME
the node property cacheable property name
|
static java.lang.String |
PROPERTY_INFO_PROPERTY_NAME
the property info property name
|
static java.lang.String |
SHORTDESCRIPTION_PROPERTY_DISPLAY_NAME
the display name of the short description property
|
static java.lang.String |
SHORTDESCRIPTION_PROPERTY_NAME
the short description property name
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisplayName()
Returns the internal display name of the associated bean.
|
java.lang.String |
getName()
Returns the internal name of the associated bean.
|
java.lang.String[] |
getNodeActions()
Returns an array of qualified name of actions for the node representing the associated bean.
|
java.lang.String |
getNodeDefaultAction()
Returns the qualified name of the default action for the node representing the associated bean.
|
java.awt.Image |
getNodeIcon()
Returns the icon in 16x16 size used to display the node representing the associated bean.
|
java.lang.Boolean |
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.
|
PropertyInfo[] |
getPropertyInfo()
Returns an array of
PropertyInfo specifying information on some properties. |
java.lang.String |
getShortDescription()
Returns a short description of the associated bean (used in tooltip for instance).
|
static final java.lang.String CLASS_PROPERTY_NAME
static final java.lang.String NAME_PROPERTY_NAME
static final java.lang.String DISPLAYNAME_PROPERTY_NAME
static final java.lang.String SHORTDESCRIPTION_PROPERTY_NAME
static final java.lang.String NODE_ICON_PROPERTY_NAME
static final java.lang.String NODE_DEFAULT_ACTION_PROPERTY_NAME
static final java.lang.String NODE_ACTIONS_PROPERTY_NAME
static final java.lang.String NODE_PROPERTIES_CACHEABLE_PROPERTY_NAME
static final java.lang.String PROPERTY_INFO_PROPERTY_NAME
static final java.lang.String NAME_PROPERTY_DISPLAY_NAME
static final java.lang.String DISPLAYNAME_PROPERTY_DISPLAY_NAME
static final java.lang.String SHORTDESCRIPTION_PROPERTY_DISPLAY_NAME
java.lang.String getName()
namenormal (visible in a property sheet)a unique name generated using BeanUtils.
generateUniqueBeanName()
java.lang.String getDisplayName()
displayNamenormal (visible in a property sheet)if getName() is available it is used instead of
getDisplayName(), else beanInfo.getBeanDescriptor().getDisplayName() is usedjava.lang.String getShortDescription()
shortDescriptionnormal (visible in a property sheet)beanInfo.getBeanDescriptor().
getShortDescription()java.awt.Image getNodeIcon()
nodeIconhidden (not visible in a property sheet)beanInfo.getIcon()java.lang.String getNodeDefaultAction()
nodeDefaultActionhiddenuse the possible tagging of the BeanDescriptor
of the BeanInfo : BeanTagger.getDefaultAction(beanInfo.getBeanDescriptor())java.lang.String[] getNodeActions()
nodeActionshidden (not visible in a property sheet)use the possible tagging of the BeanDescriptor
of the BeanInfo : BeanTagger.getActions(beanInfo.getBeanDescriptor())java.lang.Boolean getNodePropertiesCacheable()
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().
nodePropertiesCacheablehidden (not visible in a property sheet)use the possible tagging of the BeanDescriptor
of the BeanInfo : BeanTagger.isCacheable(beanInfo.getBeanDescriptor())PropertyInfo[] getPropertyInfo()
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.
propertyInfohidden (not visible in a property sheet)use PropertyDescriptors from
BeanInfo