

Classes | |
| class | Descriptor |
| class | GuiUpdaterIntrospector |
Public Member Functions | |
| Action | getPreferredAction () |
| Object | getBean () |
| void | destroy () throws java.io.IOException |
| java.awt.Image | getIcon (int type) |
| java.awt.Image | getOpenedIcon (int type) |
| boolean | hasCustomizer () |
| java.awt.Component | getCustomizer () |
| void | resetCache () |
Protected Member Functions | |
| BeanNode (Object bean, Children children) throws IntrospectionException | |
| void | createProperties (Object bean, BeanInfo info, PropertyInfo[] propertyInfo) |
| SystemAction[] | createActions () |
Static Package Functions | |
| [static initializer] | |
Private Member Functions | |
| void | resetCache (String propertyName) |
| void | resetCache (Sheet.Set sheetSet) |
| void | resetCache (Sheet.Set sheetSet, String propertyName) |
| void | hideUnwantedPropertyDescriptors () |
| void | initialization () throws IntrospectionException |
| SystemAction | getDefaultActionInstance (String defaultAction) |
Static Private Member Functions | |
| static Node.Property | createIndexedNodeProperty (Object bean, IndexedPropertyDescriptor p, CachingStrategy strategy) |
| static Node.Property | createNodeProperty (Object bean, PropertyDescriptor p, CachingStrategy strategy) |
| static CachingStrategy | createCachingStrategy (Boolean beanCacheable, Boolean propertyCacheable) |
| static Descriptor | computeProperties (Object bean, BeanInfo info, boolean ignoreHiddenProperties, Boolean nodePropertiesCacheable, PropertyInfo[] propertyInfo) |
| static PropertyInfo | findPropertyInfoByName (PropertyInfo[] propertyInfo, String propName) |
| static void | exception (Throwable e) |
| static void | warning (Throwable e) |
| static void | initializeCookieSet (Object bean, CookieSet cookieSet) |
| static final Node.Cookie | createInstanceCookie (final Object o) |
| static final java.awt.Dialog | createDialog (Object o) |
| static void | attachCustomizer (Node node, java.beans.Customizer cust) |
Private Attributes | |
| java.awt.Image | _iconColor16 |
| Object | _bean |
| BeanInfo | _beanInfo |
| GuiUpdaterIntrospector | _guiUpdater |
| Boolean | _nodePropertiesCacheable |
| SystemAction | _defaultAction |
Static Private Attributes | |
| static final CachingStrategy | DEFAULT_CACHING_STRATEGY = new NoCachingStrategy() |
| static final String | ICON_BASE = "org/openide/resources/beans" |
| static final Node.Property[] | EMPTY_NODE_PROPERTY_ARRAY = new Node.Property[0] |
<font size="-1" color="#FF0000">**For internal use only** </font> Represents one JavaBean in the nodes hierarchy. It provides all methods that are needed for communication between the NetBeans platform and the bean.
You may use this node type for an already-existing JavaBean in order for its JavaBean properties to be reflected as corresponding node properties. Thus, it serves as a compatibility wrapper.
This BeanNode is based on a NodeUpdater that provides it the information it needs. BeanNode builds a NodeUpdater based on the introspection of the bean. Then it tries to register itself as PropertyChangeListener provided that the bean implements the method addPropertyChangeListener. In such a case, the BeanNode will receive the PropertyChangeEvent and update itself when needed.
Whether or not the BeanNode can register itself as PropertyChangeListener or receives any PropertyChangeEvent, it will still try to use the getters available through introspection to initialize itself. When a given getter is not available for a property needed by the node, the node will try to find a default value in the BeanInfo.
To see the property this node is interested in, see the class cern.gp.beans.IntrospectionBasedNodeUpdater.
| cern::gp::nodes::impl::BeanNode::BeanNode | ( | Object | bean, | |
| Children | children | |||
| ) | throws IntrospectionException [inline, protected] |
Constructs a node for a JavaBean with a defined child list. Intended for use by subclasses with different strategies for computing the children.
| bean | the bean this node will be based on | |
| children | the children of this node |
| IntrospectionException | if the bean cannot be analyzed |
References _bean, and initialization().
| cern::gp::nodes::impl::BeanNode::[static initializer] | ( | ) | [inline, static, package] |
| static void cern::gp::nodes::impl::BeanNode::attachCustomizer | ( | Node | node, | |
| java.beans.Customizer | cust | |||
| ) | [inline, static, private] |
Attaches a customizer to given node.
| node | the bean node | |
| cust | customizer to attach |
Referenced by getCustomizer().
| static Descriptor cern::gp::nodes::impl::BeanNode::computeProperties | ( | Object | bean, | |
| BeanInfo | info, | |||
| boolean | ignoreHiddenProperties, | |||
| Boolean | nodePropertiesCacheable, | |||
| PropertyInfo[] | propertyInfo | |||
| ) | [inline, static, private] |
Computes a descriptor for properties from a bean info.
| bean | bean to create properties for | |
| info | about the bean | |
| ignoreHiddenProperties | true if hidden property should be ignored completely | |
| propertyInfo | extra information of some properties (possibly null) |
References createCachingStrategy(), createIndexedNodeProperty(), createNodeProperty(), findPropertyInfoByName(), and cern::gp::beans::PropertyInfo::updatePropertyDescriptor().
Referenced by createProperties().
| SystemAction [] cern::gp::nodes::impl::BeanNode::createActions | ( | ) | [inline, protected] |
Returns the actions that shall be displayed in the pop-up menu for this node. This method is called by Netbeans Explorer to build the pop-up menu for this node. It uses the BeanInfo associated with the contained bean for finding the actions.
References _bean, _guiUpdater, cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeActions(), and warning().
| static CachingStrategy cern::gp::nodes::impl::BeanNode::createCachingStrategy | ( | Boolean | beanCacheable, | |
| Boolean | propertyCacheable | |||
| ) | [inline, static, private] |
Referenced by computeProperties().
| static final java.awt.Dialog cern::gp::nodes::impl::BeanNode::createDialog | ( | Object | o | ) | [inline, static, private] |
Checks whether an object is instance of DialogDescriptor and if so it used top manager to create its instance.
| maybeDialogDescriptor | an object |
Referenced by getCustomizer().
| static Node.Property cern::gp::nodes::impl::BeanNode::createIndexedNodeProperty | ( | Object | bean, | |
| IndexedPropertyDescriptor | p, | |||
| CachingStrategy | strategy | |||
| ) | [inline, static, private] |
Referenced by computeProperties().
| static final Node.Cookie cern::gp::nodes::impl::BeanNode::createInstanceCookie | ( | final Object | o | ) | [inline, static, private] |
Creates InstanceCookie, if available.
| bean | the object to create cookie for |
Referenced by initialization().
| static Node.Property cern::gp::nodes::impl::BeanNode::createNodeProperty | ( | Object | bean, | |
| PropertyDescriptor | p, | |||
| CachingStrategy | strategy | |||
| ) | [inline, static, private] |
Referenced by computeProperties().
| void cern::gp::nodes::impl::BeanNode::createProperties | ( | Object | bean, | |
| BeanInfo | info, | |||
| PropertyInfo[] | propertyInfo | |||
| ) | [inline, protected] |
Prepare node properties based on the bean, storing them into the current property sheet. Called when the bean info is ready. This implementation always creates a set for standard properties and may create a set for expert ones if there are any.
| bean | bean to compute properties for | |
| info | information about the bean | |
| propertyInfo | extra information of some properties (possibly null) |
References _beanInfo, _nodePropertiesCacheable, computeProperties(), cern::gp::nodes::impl::BeanNode::Descriptor::expert, and cern::gp::nodes::impl::BeanNode::Descriptor::property.
Referenced by initialization().
| void cern::gp::nodes::impl::BeanNode::destroy | ( | ) | throws java.io.IOException [inline] |
Detaches all listeners from the bean and destroys it.
| IOException | if there was a problem |
References _guiUpdater, and cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::removeNodeUpdaterListener().
| static void cern::gp::nodes::impl::BeanNode::exception | ( | Throwable | e | ) | [inline, static, private] |
Referenced by getCustomizer().
| static PropertyInfo cern::gp::nodes::impl::BeanNode::findPropertyInfoByName | ( | PropertyInfo[] | propertyInfo, | |
| String | propName | |||
| ) | [inline, static, private] |
References cern::gp::beans::PropertyInfo::getName().
Referenced by computeProperties().
| Object cern::gp::nodes::impl::BeanNode::getBean | ( | ) | [inline] |
References _bean.
| java.awt.Component cern::gp::nodes::impl::BeanNode::getCustomizer | ( | ) | [inline] |
Returns the customizer component.
null if there is no customizer References _bean, _beanInfo, _guiUpdater, attachCustomizer(), createDialog(), exception(), and cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::hasRegisteredListenerInternal().
| SystemAction cern::gp::nodes::impl::BeanNode::getDefaultActionInstance | ( | String | defaultAction | ) | [inline, private] |
References _bean, and warning().
Referenced by cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::fireNodeDefaultActionChange(), and initialization().
| java.awt.Image cern::gp::nodes::impl::BeanNode::getIcon | ( | int | type | ) | [inline] |
Get an icon for this node in the closed state. Uses the Bean's icon if possible.
| type | constant from java.beans.BeanInfo |
References _beanInfo, and _iconColor16.
Referenced by getOpenedIcon().
| java.awt.Image cern::gp::nodes::impl::BeanNode::getOpenedIcon | ( | int | type | ) | [inline] |
Get an icon for this node in the open state.
| type | type constants |
References getIcon().
| Action cern::gp::nodes::impl::BeanNode::getPreferredAction | ( | ) | [inline] |
References _defaultAction.
| boolean cern::gp::nodes::impl::BeanNode::hasCustomizer | ( | ) | [inline] |
Test if there is a customizer for this node. If true the customizer can be obtained via getCustomizer method.
true if there is a customizer. References _beanInfo.
| void cern::gp::nodes::impl::BeanNode::hideUnwantedPropertyDescriptors | ( | ) | [inline, private] |
References _beanInfo, _guiUpdater, and cern::gp::beans::impl::IntrospectionBasedNodeUpdater::isPropertyHidden().
Referenced by initialization().
| void cern::gp::nodes::impl::BeanNode::initialization | ( | ) | throws IntrospectionException [inline, private] |
Performs initalization of the node
References _bean, _beanInfo, _defaultAction, _guiUpdater, _iconColor16, _nodePropertiesCacheable, createInstanceCookie(), createProperties(), getDefaultActionInstance(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getDisplayName(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getName(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeDefaultAction(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodeIcon(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getNodePropertiesCacheable(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getPropertyInfo(), cern::gp::beans::impl::IntrospectionBasedNodeUpdater::getShortDescription(), hideUnwantedPropertyDescriptors(), ICON_BASE, and initializeCookieSet().
Referenced by BeanNode().
| static void cern::gp::nodes::impl::BeanNode::initializeCookieSet | ( | Object | bean, | |
| CookieSet | cookieSet | |||
| ) | [inline, static, private] |
Initializes the CookieSet with the corresponding Capability available from the bean directly or through a CapabilityProvider
| bean | the bean from which to find the capabilities | |
| cookieSet | the cookie set to update |
References cern::gp::capabilities::CapabilityProvider::getCapabilities().
Referenced by initialization().
| void cern::gp::nodes::impl::BeanNode::resetCache | ( | Sheet.Set | sheetSet, | |
| String | propertyName | |||
| ) | [inline, private] |
| void cern::gp::nodes::impl::BeanNode::resetCache | ( | Sheet.Set | sheetSet | ) | [inline, private] |
| void cern::gp::nodes::impl::BeanNode::resetCache | ( | String | propertyName | ) | [inline, private] |
References resetCache().
| void cern::gp::nodes::impl::BeanNode::resetCache | ( | ) | [inline] |
reset the cache for this Node. As a result the node will reset the cache of all its properties.
Implements cern::gp::nodes::cache::Cacheable.
Referenced by cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::firePropertyChange(), and resetCache().
| static void cern::gp::nodes::impl::BeanNode::warning | ( | Throwable | e | ) | [inline, static, private] |
Referenced by createActions(), and getDefaultActionInstance().
Object cern::gp::nodes::impl::BeanNode::_bean [private] |
bean
Referenced by BeanNode(), createActions(), getBean(), getCustomizer(), getDefaultActionInstance(), and initialization().
BeanInfo cern::gp::nodes::impl::BeanNode::_beanInfo [private] |
bean info for the bean
Referenced by createProperties(), getCustomizer(), getIcon(), hasCustomizer(), hideUnwantedPropertyDescriptors(), and initialization().
SystemAction cern::gp::nodes::impl::BeanNode::_defaultAction [private] |
Referenced by createActions(), destroy(), getCustomizer(), hideUnwantedPropertyDescriptors(), and initialization().
java.awt.Image cern::gp::nodes::impl::BeanNode::_iconColor16 [private] |
cached value of the icon when changed
Referenced by cern::gp::nodes::impl::BeanNode::GuiUpdaterIntrospector::fireNodeIconChange(), getIcon(), and initialization().
Boolean cern::gp::nodes::impl::BeanNode::_nodePropertiesCacheable [private] |
Referenced by createProperties(), and initialization().
final CachingStrategy cern::gp::nodes::impl::BeanNode::DEFAULT_CACHING_STRATEGY = new NoCachingStrategy() [static, private] |
final Node.Property [] cern::gp::nodes::impl::BeanNode::EMPTY_NODE_PROPERTY_ARRAY = new Node.Property[0] [static, private] |
Referenced by cern::gp::nodes::impl::BeanNode::Descriptor::Descriptor().
final String cern::gp::nodes::impl::BeanNode::ICON_BASE = "org/openide/resources/beans" [static, private] |
Icon base for bean nodes
Referenced by initialization().
1.6.2