public class ViewNode extends BeanNode<java.awt.Component> implements ViewNodeContainer
Modifier and Type | Class and Description |
---|---|
protected class |
ViewNode.ComponentEventHandler
handle component events
|
protected class |
ViewNode.DropHandler
handle drop events
|
Modifier and Type | Field and Description |
---|---|
protected BorderNode |
_borderNode
the associated border node if any
|
static java.lang.String |
DATA_LABEL
data label
|
_customBeanClassName, _tag, BEAN_DATA_LABEL, BEAN_OBJECT, BEAN_PROXY, BEAN_SETTINGS
EVENT_PROXY, MESSAGE_CENTER, TREE_NODE
Constructor and Description |
---|
ViewNode(ViewNode node)
Constructor
|
ViewNode(ViewProxy<java.awt.Component> viewProxy)
Primary Constructor
|
ViewNode(ViewProxy<java.awt.Component> viewProxy,
java.util.Map<java.lang.String,java.lang.Object> beanSettings,
java.lang.String tag)
Primary Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.List<BeanProxy<?>> beanProxies)
Add the beans to this node
|
void |
addNodes(java.util.List<BeanNode<?>> nodes)
Add the views nodes to this node
|
boolean |
canAdd(BeanProxy<?> beanProxy)
Determine if the brick can add the specified view
|
java.lang.String |
dataLabel()
Provides the name used to identify the class in an external data source.
|
void |
display()
Display the bean's window
|
protected BorderNode |
getBorderNode()
get the border node
|
java.awt.Container |
getContainer()
Get the container.
|
static ViewNode |
getInstance(DataAdaptor adaptor)
generator
|
protected java.awt.Component |
getPrototypeBean(BeanProxy<java.awt.Component> beanProxy)
get the bean instance
|
int |
getTreeIndexOffsetFromViewIndex()
Get the tree index offset from the view index
|
java.awt.Component |
getView()
Get the view.
|
int |
getViewIndex(ViewNode node)
Get the index of the view node in the container
|
ViewProxy<java.awt.Component> |
getViewProxy()
Get the view proxy
|
java.awt.Window |
getWindow()
get the containing or being the view
|
void |
insertSiblingNodes(java.util.List<BeanNode<?>> nodes)
Insert the specified view nodes immediately above this node
|
void |
insertSiblings(java.util.List<BeanProxy<?>> beanProxies)
Insert the views in this node beginning at the specified index
|
void |
insertViewNode(ViewNode node,
int viewIndex)
Insert the view node in this node beginning at the specified index
|
boolean |
isWindow()
Determine if the underlying view is a window
|
void |
moveDownNodes(java.util.List<BeanNode<?>> nodes)
Move the specified nodes down
|
void |
moveUpNodes(java.util.List<BeanNode<?>> nodes)
Move the specified nodes up
|
void |
nodesAdded(java.lang.Object source,
Brick container,
java.util.List<BeanNode<?>> nodes)
Handle the event in which nodes have been added to a container
|
void |
nodesRemoved(java.lang.Object source,
Brick container,
java.util.List<BeanNode<?>> nodes)
Handle the event in which nodes have been removed from a container
|
void |
propertyChanged(BeanNode<?> beanNode,
java.beans.PropertyDescriptor propertyDescriptor,
java.lang.Object value)
Handle the event in which a bean's property has been changed
|
void |
refreshDisplay()
refresh display
|
void |
removeFromParent()
Remove this brick from its parent
|
void |
removeNode(BeanNode<?> node)
Remove the view node from this container
|
void |
removeNodes(java.util.List<BeanNode<?>> nodes)
Remove the view nodes from this container
|
protected void |
setBorderNode(BorderNode node)
set the border node
|
void |
treeNeedsRefresh(java.lang.Object source,
Brick brick)
Handle the event in which a brick's tree path needs refresh
|
void |
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.
|
applyBeanSettings, getBeanObject, getBeanObjectBeanInfo, getBeanProxy, getClassName, getCustomBeanClassName, getJavaDeclarationSnippet, getJavaReferenceSnippet, getJythonReferenceSnippet, getPropertyArchiver, getPropertyValue, getProperyDescriptorTable, getShortClassName, getTag, getViewNodeContainer, getXALReferenceSnippet, hasCustomBeanClass, setCustomBeanClassName, setPropertyValue, setTag, toString
addBrickListener, canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling, canNodeBeSibling, getContainingBrick, getParent, getTreeNode, isAncestorOf, removeBrickListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canAddAll, canAddAllNodes, canAddNode, canAllBeSiblings, canAllNodesBeSiblings, canBeSibling
public static java.lang.String DATA_LABEL
protected BorderNode _borderNode
public ViewNode(ViewProxy<java.awt.Component> viewProxy, java.util.Map<java.lang.String,java.lang.Object> beanSettings, java.lang.String tag)
public ViewNode(ViewProxy<java.awt.Component> viewProxy)
public ViewNode(ViewNode node)
public static ViewNode getInstance(DataAdaptor adaptor)
protected java.awt.Component getPrototypeBean(BeanProxy<java.awt.Component> beanProxy)
getPrototypeBean
in class BeanNode<java.awt.Component>
public java.awt.Component getView()
public ViewProxy<java.awt.Component> getViewProxy()
public int getViewIndex(ViewNode node)
node
- the node to locatepublic boolean isWindow()
public java.awt.Container getContainer()
public boolean canAdd(BeanProxy<?> beanProxy)
canAdd
in interface ViewNodeContainer
canAdd
in class Brick
public void add(java.util.List<BeanProxy<?>> beanProxies)
add
in interface ViewNodeContainer
beanProxies
- the beans to add to this nodepublic void addNodes(java.util.List<BeanNode<?>> nodes)
addNodes
in interface ViewNodeContainer
nodes
- the nodes to add to this nodepublic void insertSiblings(java.util.List<BeanProxy<?>> beanProxies)
insertSiblings
in interface ViewNodeContainer
beanProxies
- the views to add to this nodepublic int getTreeIndexOffsetFromViewIndex()
getTreeIndexOffsetFromViewIndex
in interface ViewNodeContainer
public void insertViewNode(ViewNode node, int viewIndex)
insertViewNode
in interface ViewNodeContainer
node
- the node to add to this nodeviewIndex
- the initial index at which to insert the nodepublic void insertSiblingNodes(java.util.List<BeanNode<?>> nodes)
insertSiblingNodes
in interface ViewNodeContainer
nodes
- the nodes to add to this nodepublic void moveDownNodes(java.util.List<BeanNode<?>> nodes)
moveDownNodes
in interface ViewNodeContainer
public void moveUpNodes(java.util.List<BeanNode<?>> nodes)
moveUpNodes
in interface ViewNodeContainer
public void removeNode(BeanNode<?> node)
removeNode
in interface ViewNodeContainer
node
- the node to removepublic void removeNodes(java.util.List<BeanNode<?>> nodes)
removeNodes
in interface ViewNodeContainer
nodes
- the nodes to removeprotected BorderNode getBorderNode()
protected void setBorderNode(BorderNode node)
public java.awt.Window getWindow()
public void refreshDisplay()
refreshDisplay
in class BeanNode<java.awt.Component>
public void nodesAdded(java.lang.Object source, Brick container, java.util.List<BeanNode<?>> nodes)
nodesAdded
in interface BrickListener
source
- the source of the eventcontainer
- the node to which nodes have been addednodes
- the nodes which have been addedpublic void nodesRemoved(java.lang.Object source, Brick container, java.util.List<BeanNode<?>> nodes)
nodesRemoved
in interface BrickListener
source
- the source of the eventcontainer
- the node from which nodes have been removednodes
- the nodes which have been removedpublic void propertyChanged(BeanNode<?> beanNode, java.beans.PropertyDescriptor propertyDescriptor, java.lang.Object value)
propertyChanged
in interface BrickListener
beanNode
- the node whose property has changedpropertyDescriptor
- the property which has changedvalue
- the new valuepublic void treeNeedsRefresh(java.lang.Object source, Brick brick)
treeNeedsRefresh
in interface BrickListener
source
- the source of the eventbrick
- the brick at which the refresh needs to be donepublic void removeFromParent()
removeFromParent
in class Brick
public void display()
public java.lang.String dataLabel()
dataLabel
in interface DataListener
dataLabel
in class BeanNode<java.awt.Component>
public void update(DataAdaptor adaptor)
update
in interface DataListener
update
in class BeanNode<java.awt.Component>
adaptor
- The adaptor from which to update the datapublic void write(DataAdaptor adaptor)
write
in interface DataListener
write
in class BeanNode<java.awt.Component>
adaptor
- The adaptor to which the receiver's data is written