Class RootBrick

java.lang.Object
xal.extension.bricks.Brick
xal.extension.bricks.RootBrick
All Implemented Interfaces:
BrickListener, ViewNodeContainer, DataListener

public class RootBrick extends Brick implements ViewNodeContainer, DataListener
root brick to which windows are added
  • Field Details

  • Constructor Details

    • RootBrick

      public RootBrick()
      Constructor
  • Method Details

    • disposeAllWindows

      public void disposeAllWindows()
      dispose of all windows
    • canAdd

      public boolean canAdd(BeanProxy<?> beanProxy)
      Determine if the brick can add the specified view
      Specified by:
      canAdd in interface ViewNodeContainer
      Specified by:
      canAdd in class Brick
      Returns:
      true if it can add the specified view and false if not
    • toString

      public String toString()
      Get the label
      Overrides:
      toString in class Object
      Returns:
      the label for this brick
    • add

      public void add(List<BeanProxy<?>> beanProxies)
      Add the views to this node
      Specified by:
      add in interface ViewNodeContainer
      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 interface ViewNodeContainer
      Returns:
      the tree index offset
    • moveDownNodes

      public void moveDownNodes(List<BeanNode<?>> nodes)
      move the specified nodes down
      Specified by:
      moveDownNodes in interface ViewNodeContainer
      Parameters:
      nodes -
    • moveUpNodes

      public void moveUpNodes(List<BeanNode<?>> nodes)
      move the specified nodes up
      Specified by:
      moveUpNodes in interface ViewNodeContainer
      Parameters:
      nodes -
    • insertViewNode

      public void insertViewNode(ViewNode node, int viewIndex)
      Insert the bean node in this node beginning at the specified index
      Specified by:
      insertViewNode in interface ViewNodeContainer
      Parameters:
      node - the node to insert in this node
      viewIndex - the initial index at which to begin inserting the nodes
    • insertSiblings

      public void insertSiblings(List<BeanProxy<?>> viewProxies)
      Insert the views in this node beginning at the specified index
      Specified by:
      insertSiblings in interface ViewNodeContainer
      Parameters:
      viewProxies - the views to add to this node
    • addNodes

      public void addNodes(List<BeanNode<?>> originalNodes)
      Add the views nodes to this node
      Specified by:
      addNodes in interface ViewNodeContainer
      Parameters:
      originalNodes - the nodes to add to this node
    • insertSiblingNodes

      public void insertSiblingNodes(List<BeanNode<?>> originalNodes)
      Insert the view nodes in this node beginning at the specified index
      Specified by:
      insertSiblingNodes in interface ViewNodeContainer
      Parameters:
      originalNodes - the nodes to add to this node
    • removeNode

      public void removeNode(BeanNode<?> node)
      Remove the view node from this container
      Specified by:
      removeNode in interface ViewNodeContainer
      Parameters:
      node - the node to remove
    • removeNodes

      public void removeNodes(List<BeanNode<?>> nodes)
      Remove the view nodes from this container
      Specified by:
      removeNodes in interface ViewNodeContainer
      Parameters:
      nodes - the nodes to remove
    • removeFromParent

      public void removeFromParent()
      Remove this brick from its parent
      Specified by:
      removeFromParent in class Brick
    • dataLabel

      public String dataLabel()
      Provides the name used to identify the class in an external data source.
      Specified by:
      dataLabel in interface DataListener
      Returns:
      a tag that identifies the receiver's type
    • update

      public void update(DataAdaptor adaptor)
      Update the data based on the information provided by the data provider.
      Specified by:
      update in interface DataListener
      Parameters:
      adaptor - The adaptor from which to update the data
    • write

      public void write(DataAdaptor adaptor)
      Write data to the data adaptor for storage.
      Specified by:
      write in interface DataListener
      Parameters:
      adaptor - The adaptor to which the receiver's data is written
    • nodesAdded

      public void nodesAdded(Object source, Brick container, List<BeanNode<?>> nodes)
      Handle the event in which nodes have been added to a container
      Specified by:
      nodesAdded in interface BrickListener
      Parameters:
      source - the source of the event
      container - the node to which nodes have been added
      nodes - the nodes which have been added
    • nodesRemoved

      public void nodesRemoved(Object source, Brick container, List<BeanNode<?>> nodes)
      Handle the event in which nodes have been removed from a container
      Specified by:
      nodesRemoved in interface BrickListener
      Parameters:
      source - the source of the event
      container - the node from which nodes have been removed
      nodes - the nodes which have been removed
    • propertyChanged

      public void propertyChanged(BeanNode<?> node, PropertyDescriptor propertyDescriptor, Object value)
      Handle the event in which a bean's property has been changed
      Specified by:
      propertyChanged in interface BrickListener
      Parameters:
      node - the node whose property has changed
      propertyDescriptor - the property which has changed
      value - the new value
    • treeNeedsRefresh

      public void treeNeedsRefresh(Object source, Brick brick)
      Handle the event in which a brick's tree path needs refresh
      Specified by:
      treeNeedsRefresh in interface BrickListener
      Parameters:
      source - the source of the event
      brick - the brick at which the refresh needs to be done