XdevTree

XdevTree

The XdevTree is a selection component with which you can map hierarchical data. Each tree has a root node from which all the other nodes branch out. You have the option of displaying or not displaying the root. Each node has a lot of further nodes hanging onto it, which are called as Children. A node with children is called as parent node. The user can select nodes with collapsing and expanding children. By default, the data is lazy reloaded only on expanding a node using the RapidClipse framework. Even drag-and-draop is supported.

Wichtige Properties:
  • Preload all - Initially loads the entire tree.

  • ReadOnly 

Important events:
  • Misc

    • nodeCollapse - Event is triggered on collapsing an entry.

    • nodeExpand - Is triggered if the column width is changed. The id of the item can be read from the Tree.CollapseEvent-Object.

Data binding:
  • Data container (model) 

    • XdevBeanItemContainer - Standard data container. The allocation is set using the setContainerDataSource method.  However, with this method, only an element level is possible.

      // Generates a new XdevBeanItemContainer 'productList' XdevBeanItemContainer<Product> productList = new XdevBeanItemContainer<Product>(Product.class);   // Sets the XdevBeanItemContainer tree.setContainerDataSource(productList);
    • XdevHierarchicalBeanItemContainer - Is used by RapidClipse, if the tree is configured using the properties. 

      tree.setContainerDataSource( // new TreeDataProvider for this tree. Inserts all root nodes with findAll and defines two additional levels TreeDataProvider.New(DAOs.get(EmployeeDAO.class).findAll()) .addLevel(Employee::getOrders).addLevel(Order::getOrderdetails), false );
Examples:
  • Root visible or not visible

  • Initially entire tree expanded / collapsed

  • Return selected node

  • Locate specific node

  • Move node using drag and drop

  • Attach multiple values to a node separated with semicolon

  • Add new node

  • Remove selected node

  • Add entries - Manually adds entries to the XdevTree.

  • Change icons, possibly a separate icon for each level or a separate icon for each data type

All XdevTree Methods

 

XDEV Software Corp. - One Embarcadero Center, San Francisco, CA 94111, US
Copyright © 2015. XDEV Software Corp. All rights reserved.