Class Brick

java.lang.Object
xal.extension.bricks.Brick
Direct Known Subclasses:
BeanNode, RootBrick

public abstract class Brick extends Object
Base node for holding views and other items
  • Field Details

    • treeNode

      protected final DefaultMutableTreeNode treeNode
      the tree node
    • messageCenter

      protected final MessageCenter messageCenter
      message center which dispatches events
    • eventProxy

      protected final BrickListener eventProxy
      proxy which forwards events to registered listeners
  • Constructor Details

    • Brick

      protected Brick()
      Primary Constructor
  • Method Details

    • addBrickListener

      public void addBrickListener(BrickListener listener)
      Add a listener of view node events
      Parameters:
      listener - the listener to register for receiving events
    • removeBrickListener

      public void removeBrickListener(BrickListener listener)
      Remove the listener from receiving view node events
      Parameters:
      listener - the listener to remove for receiving events from this node
    • getTreeNode

      public DefaultMutableTreeNode getTreeNode()
      Get the tree node.
      Returns:
      the tree node
    • getParent

      public Object getParent()
      Get the parent view node
      Returns:
      the parent view node
    • getContainingBrick

      public Brick getContainingBrick()
      Get the containing node
      Returns:
      the parent view node
    • isAncestorOf

      public boolean isAncestorOf(Brick brick)
      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

      public abstract boolean canAdd(BeanProxy<?> beanProxy)
      Determine if the brick can add the specified view
      Returns:
      true if it can add the specified view and false if not
    • canBeSibling

      public boolean canBeSibling(BeanProxy<?> beanProxy)
      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

      public boolean canAllBeSiblings(List<BeanProxy<?>> beanProxies)
      Determine if all views can be sibling views
      Returns:
      true if all views can be siblings and false if not
    • canAddAll

      public boolean canAddAll(List<BeanProxy<?>> views)
      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

      public boolean canAddNode(BeanNode<?> node)
      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

      public boolean canAddAllNodes(List<BeanNode<?>> nodes)
      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

      public boolean canNodeBeSibling(BeanNode<?> node)
      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

      public boolean canAllNodesBeSiblings(List<BeanNode<?>> nodes)
      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