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 BrickListener
proxy which forwards events to registered listenersprotected final MessageCenter
message center which dispatches eventsprotected final DefaultMutableTreeNode
the tree node -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBrickListener
(BrickListener listener) Add a listener of view node eventsabstract boolean
Determine if the brick can add the specified viewboolean
Determine if the brick can add all of the specified viewsboolean
canAddAllNodes
(List<BeanNode<?>> nodes) Determine if the brick can add all of the specified view nodesboolean
canAddNode
(BeanNode<?> node) Determine if this brick can add the specified view nodeboolean
canAllBeSiblings
(List<BeanProxy<?>> beanProxies) Determine if all views can be sibling viewsboolean
canAllNodesBeSiblings
(List<BeanNode<?>> nodes) Determine if all views can be sibling viewsboolean
canBeSibling
(BeanProxy<?> beanProxy) Determine if the brick can be inserted in this view's parentboolean
canNodeBeSibling
(BeanNode<?> node) Determine if the node can be added as a siblingGet the containing nodeGet the parent view nodeGet the tree node.boolean
isAncestorOf
(Brick brick) Determine if this brick is the ancestor of the specified brickvoid
removeBrickListener
(BrickListener listener) Remove the listener from receiving view node eventsabstract void
Remove 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
-