Package xal.extension.bricks
Class ViewNode
- All Implemented Interfaces:
BrickListener
,ViewNodeContainer
,DataListener
brick which represents a view
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
handle component eventsprotected class
handle drop events -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BorderNode
the associated border node if anystatic final String
data labelFields inherited from class xal.extension.bricks.BeanNode
BEAN_DATA_LABEL, beanObject, beanProxy, beanSettings, customBeanClassName, tag
Fields inherited from class xal.extension.bricks.Brick
eventProxy, messageCenter, treeNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the beans to this nodevoid
Add the views nodes to this nodeboolean
Determine if the brick can add the specified viewProvides the name used to identify the class in an external data source.void
display()
Display the bean's windowprotected BorderNode
get the border nodeGet the container.static ViewNode
getInstance
(DataAdaptor adaptor) generatorprotected Component
getPrototypeBean
(BeanProxy<Component> beanProxy) get the bean instanceint
Get the tree index offset from the view indexgetView()
Get the view.int
getViewIndex
(ViewNode node) Get the index of the view node in the containerGet the view proxyget the containing or being the viewvoid
insertSiblingNodes
(List<BeanNode<?>> nodes) Insert the specified view nodes immediately above this nodevoid
insertSiblings
(List<BeanProxy<?>> beanProxies) Insert the views in this node beginning at the specified indexvoid
insertViewNode
(ViewNode node, int viewIndex) Insert the view node in this node beginning at the specified indexboolean
isWindow()
Determine if the underlying view is a windowvoid
moveDownNodes
(List<BeanNode<?>> nodes) Move the specified nodes downvoid
moveUpNodes
(List<BeanNode<?>> nodes) Move the specified nodes upvoid
nodesAdded
(Object source, Brick container, List<BeanNode<?>> nodes) Handle the event in which nodes have been added to a containervoid
nodesRemoved
(Object source, Brick container, List<BeanNode<?>> nodes) Handle the event in which nodes have been removed from a containervoid
propertyChanged
(BeanNode<?> beanNode, PropertyDescriptor propertyDescriptor, Object value) Handle the event in which a bean's property has been changedvoid
refresh displayvoid
Remove this brick from its parentvoid
removeNode
(BeanNode<?> node) Remove the view node from this containervoid
removeNodes
(List<BeanNode<?>> nodes) Remove the view nodes from this containerprotected void
setBorderNode
(BorderNode node) set the border nodevoid
treeNeedsRefresh
(Object source, Brick brick) Handle the event in which a brick's tree path needs refreshvoid
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.BeanNode
applyBeanSettings, getBeanObject, getBeanObjectBeanInfo, getBeanProxy, getClassName, getCustomBeanClassName, getJavaDeclarationSnippet, getJavaReferenceSnippet, getJythonReferenceSnippet, getPropertyArchiver, getPropertyValue, getProperyDescriptorTable, getShortClassName, getTag, getViewNodeContainer, getXALReferenceSnippet, hasCustomBeanClass, setCustomBeanClassName, setPropertyValue, setTag, toString
Methods inherited from class xal.extension.bricks.Brick
addBrickListener, canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling, canNodeBeSibling, getContainingBrick, getParent, getTreeNode, isAncestorOf, removeBrickListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
getPrototypeBean
in 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:
canAdd
in interfaceViewNodeContainer
- Specified by:
canAdd
in classBrick
- Returns:
- true if it can add the specified view and false if not
-
add
Add the beans to this node- Specified by:
add
in interfaceViewNodeContainer
- Parameters:
beanProxies
- the beans to add to this node
-
addNodes
Add the views nodes to this node- Specified by:
addNodes
in interfaceViewNodeContainer
- Parameters:
nodes
- the nodes to add to this node
-
insertSiblings
Insert the views in this node beginning at the specified index- Specified by:
insertSiblings
in 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:
getTreeIndexOffsetFromViewIndex
in interfaceViewNodeContainer
- Returns:
- the tree index offset
-
insertViewNode
Insert the view node in this node beginning at the specified index- Specified by:
insertViewNode
in 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:
insertSiblingNodes
in interfaceViewNodeContainer
- Parameters:
nodes
- the nodes to add to this node
-
moveDownNodes
Move the specified nodes down- Specified by:
moveDownNodes
in interfaceViewNodeContainer
-
moveUpNodes
Move the specified nodes up- Specified by:
moveUpNodes
in interfaceViewNodeContainer
-
removeNode
Remove the view node from this container- Specified by:
removeNode
in interfaceViewNodeContainer
- Parameters:
node
- the node to remove
-
removeNodes
Remove the view nodes from this container- Specified by:
removeNodes
in 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:
refreshDisplay
in classBeanNode<Component>
-
nodesAdded
Handle the event in which nodes have been added to a container- Specified by:
nodesAdded
in 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:
nodesRemoved
in 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:
propertyChanged
in 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:
treeNeedsRefresh
in 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:
removeFromParent
in 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:
dataLabel
in interfaceDataListener
- Specified by:
dataLabel
in 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:
update
in interfaceDataListener
- Overrides:
update
in classBeanNode<Component>
- Parameters:
adaptor
- The adaptor from which to update the data
-
write
Write data to the data adaptor for storage.- Specified by:
write
in interfaceDataListener
- Overrides:
write
in classBeanNode<Component>
- Parameters:
adaptor
- The adaptor to which the receiver's data is written
-