Package xal.extension.bricks
Class Brick
java.lang.Object
xal.extension.bricks.Brick
Base node for holding views and other items
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BrickListenerproxy which forwards events to registered listenersprotected final MessageCentermessage center which dispatches eventsprotected final DefaultMutableTreeNodethe tree node -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBrickListener(BrickListener listener) Add a listener of view node eventsabstract booleanDetermine if the brick can add the specified viewbooleanDetermine if the brick can add all of the specified viewsbooleancanAddAllNodes(List<BeanNode<?>> nodes) Determine if the brick can add all of the specified view nodesbooleancanAddNode(BeanNode<?> node) Determine if this brick can add the specified view nodebooleancanAllBeSiblings(List<BeanProxy<?>> beanProxies) Determine if all views can be sibling viewsbooleancanAllNodesBeSiblings(List<BeanNode<?>> nodes) Determine if all views can be sibling viewsbooleancanBeSibling(BeanProxy<?> beanProxy) Determine if the brick can be inserted in this view's parentbooleancanNodeBeSibling(BeanNode<?> node) Determine if the node can be added as a siblingGet the containing nodeGet the parent view nodeGet the tree node.booleanisAncestorOf(Brick brick) Determine if this brick is the ancestor of the specified brickvoidremoveBrickListener(BrickListener listener) Remove the listener from receiving view node eventsabstract voidRemove this brick from its parent
-
Field Details
-
treeNode
the tree node -
messageCenter
message center which dispatches events -
eventProxy
proxy which forwards events to registered listeners
-
-
Constructor Details
-
Brick
protected Brick()Primary Constructor
-
-
Method Details
-
addBrickListener
Add a listener of view node events- Parameters:
listener- the listener to register for receiving events
-
removeBrickListener
Remove the listener from receiving view node events- Parameters:
listener- the listener to remove for receiving events from this node
-
getTreeNode
Get the tree node.- Returns:
- the tree node
-
getParent
Get the parent view node- Returns:
- the parent view node
-
getContainingBrick
Get the containing node- Returns:
- the parent view node
-
isAncestorOf
Determine if this brick is the ancestor of the specified brick- Parameters:
brick- the brick to test- Returns:
- true if this brick is an ancestor of the specified brick and false if not
-
canAdd
Determine if the brick can add the specified view- Returns:
- true if it can add the specified view and false if not
-
canBeSibling
Determine if the brick can be inserted in this view's parent- Returns:
- true the view can be a sibling to this view and false if not
-
canAllBeSiblings
Determine if all views can be sibling views- Returns:
- true if all views can be siblings and false if not
-
canAddAll
Determine if the brick can add all of the specified views- Returns:
- true if it can add the specified view and false if not
-
canAddNode
Determine if this brick can add the specified view node- Parameters:
node- the node to test for addition- Returns:
- true if it can add the specified view node and false if not
-
canAddAllNodes
Determine if the brick can add all of the specified view nodes- Returns:
- true if it can add all of the specified view nodes and false if not
-
canNodeBeSibling
Determine if the node can be added as a sibling- Parameters:
node- the node to test- Returns:
- true if the node can be added as a sibling and false if not
-
canAllNodesBeSiblings
Determine if all views can be sibling views- Returns:
- true if all views can be siblings and false if not
-
removeFromParent
public abstract void removeFromParent()Remove this brick from its parent
-