This tree works just as the one found in the Microsoft Windows Explorer, expand/collapse a tree item by double click on the icon or by single click on the plus/minus symbol.
Buttons below bound to the tree root.

This is the method thats called when you click on a tree item.

Pretty self explaining, expands or collapses the current item.

Expands or collapses the current item and all child items (recursive).

Expands or collapses all child items (recursive) but not the item itself.

Returns the id of the selected item (if any)

Add node(s) below selected, or remove the selected node.