Zebra API Doc

ui.tree Package

Tree UI components and all related to the component classes and interfaces. Tree components are graphical representation of a tree model that allows a user to navigate over the model item, customize the items rendering and organize customizable editing of the items.

   // create tree component instance to visualize the given tree model
   var tree = new zebra.ui.tree.Tree({
       value: "Root",
       kids : [
           "Item 1",
           "Item 2",
           "Item 3"
       ]
   });

   // make all tree items editable with text field component
   tree.setEditorProvider(new zebra.ui.tree.DefEditors());

One more tree component implementation - "CompTree" - allows developers to create tree whose nodes are other UI components

   // create tree component instance to visualize the given tree model
   var tree = new zebra.ui.tree.CompTree({
       value: new zebra.ui.Label("Root label item"),
       kids : [
           new zebra.ui.Checkbox("Checkbox Item"),
           new zebra.ui.Button("Button Item"),
           new zebra.ui.TextField("Text field item")
       ]
   });