Package xal.extension.bricks
Class ViewNode
- All Implemented Interfaces:
BrickListener,ViewNodeContainer,DataListener
brick which represents a view
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classhandle component eventsprotected classhandle drop events -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BorderNodethe associated border node if anystatic final Stringdata labelFields inherited from class xal.extension.bricks.BeanNode
BEAN_DATA_LABEL, beanObject, beanProxy, beanSettings, customBeanClassName, tagFields inherited from class xal.extension.bricks.Brick
eventProxy, messageCenter, treeNode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the beans to this nodevoidAdd the views nodes to this nodebooleanDetermine if the brick can add the specified viewProvides the name used to identify the class in an external data source.voiddisplay()Display the bean's windowprotected BorderNodeget the border nodeGet the container.static ViewNodegetInstance(DataAdaptor adaptor) generatorprotected ComponentgetPrototypeBean(BeanProxy<Component> beanProxy) get the bean instanceintGet the tree index offset from the view indexgetView()Get the view.intgetViewIndex(ViewNode node) Get the index of the view node in the containerGet the view proxyget the containing or being the viewvoidinsertSiblingNodes(List<BeanNode<?>> nodes) Insert the specified view nodes immediately above this nodevoidinsertSiblings(List<BeanProxy<?>> beanProxies) Insert the views in this node beginning at the specified indexvoidinsertViewNode(ViewNode node, int viewIndex) Insert the view node in this node beginning at the specified indexbooleanisWindow()Determine if the underlying view is a windowvoidmoveDownNodes(List<BeanNode<?>> nodes) Move the specified nodes downvoidmoveUpNodes(List<BeanNode<?>> nodes) Move the specified nodes upvoidnodesAdded(Object source, Brick container, List<BeanNode<?>> nodes) Handle the event in which nodes have been added to a containervoidnodesRemoved(Object source, Brick container, List<BeanNode<?>> nodes) Handle the event in which nodes have been removed from a containervoidpropertyChanged(BeanNode<?> beanNode, PropertyDescriptor propertyDescriptor, Object value) Handle the event in which a bean's property has been changedvoidrefresh displayvoidRemove this brick from its parentvoidremoveNode(BeanNode<?> node) Remove the view node from this containervoidremoveNodes(List<BeanNode<?>> nodes) Remove the view nodes from this containerprotected voidsetBorderNode(BorderNode node) set the border nodevoidtreeNeedsRefresh(Object source, Brick brick) Handle the event in which a brick's tree path needs refreshvoidupdate(DataAdaptor adaptor) Update the data based on the information provided by the data provider.voidwrite(DataAdaptor adaptor) Write data to the data adaptor for storage.Methods inherited from class xal.extension.bricks.BeanNode
applyBeanSettings, getBeanObject, getBeanObjectBeanInfo, getBeanProxy, getClassName, getCustomBeanClassName, getJavaDeclarationSnippet, getJavaReferenceSnippet, getJythonReferenceSnippet, getPropertyArchiver, getPropertyValue, getProperyDescriptorTable, getShortClassName, getTag, getViewNodeContainer, getXALReferenceSnippet, hasCustomBeanClass, setCustomBeanClassName, setPropertyValue, setTag, toStringMethods inherited from class xal.extension.bricks.Brick
addBrickListener, canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling, canNodeBeSibling, getContainingBrick, getParent, getTreeNode, isAncestorOf, removeBrickListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface xal.extension.bricks.ViewNodeContainer
canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling
-
Field Details
-
DATA_LABEL
data label- See Also:
-
borderNode
the associated border node if any
-
-
Constructor Details
-
ViewNode
Primary Constructor -
ViewNode
Primary Constructor -
ViewNode
Constructor
-
-
Method Details
-
getInstance
generator -
getPrototypeBean
get the bean instance- Overrides:
getPrototypeBeanin classBeanNode<Component>
-
getView
Get the view.- Returns:
- the view
-
getViewProxy
Get the view proxy- Returns:
- the view proxy
-
getViewIndex
Get the index of the view node in the container- Parameters:
node- the node to locate- Returns:
- the index of the view in the container or -1 if it isn't contained in this node
-
isWindow
public boolean isWindow()Determine if the underlying view is a window- Returns:
- true if the view is a window and false if not
-
getContainer
Get the container.- Returns:
- the view as a container
-
canAdd
Determine if the brick can add the specified view- Specified by:
canAddin interfaceViewNodeContainer- Specified by:
canAddin classBrick- Returns:
- true if it can add the specified view and false if not
-
add
Add the beans to this node- Specified by:
addin interfaceViewNodeContainer- Parameters:
beanProxies- the beans to add to this node
-
addNodes
Add the views nodes to this node- Specified by:
addNodesin interfaceViewNodeContainer- Parameters:
nodes- the nodes to add to this node
-
insertSiblings
Insert the views in this node beginning at the specified index- Specified by:
insertSiblingsin interfaceViewNodeContainer- Parameters:
beanProxies- the views to add to this node
-
getTreeIndexOffsetFromViewIndex
public int getTreeIndexOffsetFromViewIndex()Get the tree index offset from the view index- Specified by:
getTreeIndexOffsetFromViewIndexin interfaceViewNodeContainer- Returns:
- the tree index offset
-
insertViewNode
Insert the view node in this node beginning at the specified index- Specified by:
insertViewNodein interfaceViewNodeContainer- Parameters:
node- the node to add to this nodeviewIndex- the initial index at which to insert the node
-
insertSiblingNodes
Insert the specified view nodes immediately above this node- Specified by:
insertSiblingNodesin interfaceViewNodeContainer- Parameters:
nodes- the nodes to add to this node
-
moveDownNodes
Move the specified nodes down- Specified by:
moveDownNodesin interfaceViewNodeContainer
-
moveUpNodes
Move the specified nodes up- Specified by:
moveUpNodesin interfaceViewNodeContainer
-
removeNode
Remove the view node from this container- Specified by:
removeNodein interfaceViewNodeContainer- Parameters:
node- the node to remove
-
removeNodes
Remove the view nodes from this container- Specified by:
removeNodesin interfaceViewNodeContainer- Parameters:
nodes- the nodes to remove
-
getBorderNode
get the border node -
setBorderNode
set the border node -
getWindow
get the containing or being the view -
refreshDisplay
public void refreshDisplay()refresh display- Overrides:
refreshDisplayin classBeanNode<Component>
-
nodesAdded
Handle the event in which nodes have been added to a container- Specified by:
nodesAddedin interfaceBrickListener- Parameters:
source- the source of the eventcontainer- the node to which nodes have been addednodes- the nodes which have been added
-
nodesRemoved
Handle the event in which nodes have been removed from a container- Specified by:
nodesRemovedin interfaceBrickListener- Parameters:
source- the source of the eventcontainer- the node from which nodes have been removednodes- the nodes which have been removed
-
propertyChanged
public void propertyChanged(BeanNode<?> beanNode, PropertyDescriptor propertyDescriptor, Object value) Handle the event in which a bean's property has been changed- Specified by:
propertyChangedin interfaceBrickListener- Parameters:
beanNode- the node whose property has changedpropertyDescriptor- the property which has changedvalue- the new value
-
treeNeedsRefresh
Handle the event in which a brick's tree path needs refresh- Specified by:
treeNeedsRefreshin interfaceBrickListener- Parameters:
source- the source of the eventbrick- the brick at which the refresh needs to be done
-
removeFromParent
public void removeFromParent()Remove this brick from its parent- Specified by:
removeFromParentin classBrick
-
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:
dataLabelin interfaceDataListener- Specified by:
dataLabelin classBeanNode<Component>- Returns:
- a tag that identifies the receiver's type
-
update
Update the data based on the information provided by the data provider.- Specified by:
updatein interfaceDataListener- Overrides:
updatein classBeanNode<Component>- Parameters:
adaptor- The adaptor from which to update the data
-
write
Write data to the data adaptor for storage.- Specified by:
writein interfaceDataListener- Overrides:
writein classBeanNode<Component>- Parameters:
adaptor- The adaptor to which the receiver's data is written
-