Package xal.extension.bricks
Class BeanNode<T>
java.lang.Object
xal.extension.bricks.Brick
xal.extension.bricks.BeanNode<T>
- All Implemented Interfaces:
DataListener
- Direct Known Subclasses:
BorderNode
,ViewNode
brick which represents a Java Bean
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
data label from bean propertiesprotected final T
bean objectthe bean proxybean settingsprotected String
custom bean class nameprotected String
tag for identifying this nodeFields inherited from class xal.extension.bricks.Brick
eventProxy, messageCenter, treeNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply the bean settingsabstract String
Provides the name used to identify the class in an external data source.void
display()
Display the bean's windowGet the bean objectGet the bean info of the view.Get the view proxyget the fully qualified class nameGet this node's custom bean class nameGet the java declaration snippetget the java reference snippetget the Jython reference snippetstatic DataListener
getPropertyArchiver
(String name, Object value) get the archiver of bean propertiesgetPropertyValue
(PropertyDescriptor propertyDescriptor) get the property valueprotected Map<String,
PropertyDescriptor> Get the property descriptor table keyed by property nameprotected T
getPrototypeBean
(BeanProxy<T> beanProxy) get the bean instanceget the short version of the class namegetTag()
Get this node's tagGet the containing nodeget the java reference snippetboolean
Determine whether this node has a custom bean classvoid
refresh displayvoid
setCustomBeanClassName
(String name) Set this node's custom bean class namevoid
setPropertyValue
(PropertyDescriptor propertyDescriptor, Object value) update the property with the specified valuevoid
Set this node's tagtoString()
get a labelvoid
update
(DataAdaptor adaptor) Update the data based on the information provided by the data provider.void
write
(DataAdaptor adaptor) Write data to the data adaptor for storage.Methods inherited from class xal.extension.bricks.Brick
addBrickListener, canAdd, canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling, canNodeBeSibling, getContainingBrick, getParent, getTreeNode, isAncestorOf, removeBrickListener, removeFromParent
-
Field Details
-
BEAN_DATA_LABEL
data label from bean properties- See Also:
-
beanObject
bean object -
beanProxy
the bean proxy -
beanSettings
bean settings -
tag
tag for identifying this node -
customBeanClassName
custom bean class name
-
-
Constructor Details
-
BeanNode
Primary Constructor -
BeanNode
Constructor -
BeanNode
Constructor
-
-
Method Details
-
getBeanProxy
Get the view proxy- Returns:
- the view proxy
-
getPrototypeBean
get the bean instance -
getBeanObject
Get the bean object -
getBeanObjectBeanInfo
Get the bean info of the view. Get the view's bean info -
getTag
Get this node's tag- Returns:
- this node's tag
-
setTag
Set this node's tag- Parameters:
tag
- the new tag
-
hasCustomBeanClass
public boolean hasCustomBeanClass()Determine whether this node has a custom bean class- Returns:
- true if this node has a custom bean class and false if not
-
getCustomBeanClassName
Get this node's custom bean class name- Returns:
- this node's custom bean class name
-
setCustomBeanClassName
Set this node's custom bean class name- Parameters:
name
- the new custom bean class name
-
getClassName
get the fully qualified class name- Returns:
- the custom class name if it exists or the prototype class name if there is no custom class
-
getShortClassName
get the short version of the class name- Returns:
- the short version of the class name
-
getJythonReferenceSnippet
get the Jython reference snippet -
getJavaReferenceSnippet
get the java reference snippet -
getXALReferenceSnippet
get the java reference snippet -
getJavaDeclarationSnippet
Get the java declaration snippet- Returns:
- the java declaration snippet
-
refreshDisplay
public void refreshDisplay()refresh display -
applyBeanSettings
protected void applyBeanSettings()apply the bean settings -
getProperyDescriptorTable
Get the property descriptor table keyed by property name -
getPropertyValue
get the property value- Throws:
Exception
-
setPropertyValue
update the property with the specified value -
getViewNodeContainer
Get the containing node- Returns:
- the parent view node
-
display
public void display()Display the bean's window -
dataLabel
Provides the name used to identify the class in an external data source.- Specified by:
dataLabel
in interfaceDataListener
- Returns:
- a tag that identifies the receiver's type
-
update
Update the data based on the information provided by the data provider.- Specified by:
update
in interfaceDataListener
- Parameters:
adaptor
- The adaptor from which to update the data
-
write
Write data to the data adaptor for storage.- Specified by:
write
in interfaceDataListener
- Parameters:
adaptor
- The adaptor to which the receiver's data is written
-
getPropertyArchiver
get the archiver of bean properties -
toString
get a label
-