Class orion.treetable.TableTree
Generates an HTML table where one of the columns is indented according to depth of children.
Clients must supply a model that generates children items, and a renderer can be supplied which generates the HTML table row for each child. Custom rendering allows clients to use checkboxes, images, links, etc. to describe each element in the tree. Renderers handle all clicks and other behavior via their supplied row content.
The table tree parent can be specified by id or DOM node.
The tree provides API for the client to programmatically expand and collapse nodes, based on the client renderer's definition of how that is done (click on icon, etc.). The tree will manage the hiding and showing of child DOM elements and proper indent
The model must implement:- getRoot(onItem)
- getChildren(parentItem, onComplete)
- getId(item) // must be a valid DOM id
- initTable(tableNode) // set up table attributes and a header if desired
- render(item, tr) // generate tds for the row
- labelColumnIndex() // 0 based index of which td contains the primary label which will be indented
- rowsChanged // optional, perform any work (such as styling) that should happen after the row content changes
- updateExpandVisuals(row, isExpanded) // update any expand/collapse visuals for the row based on the specified state
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.ui/web/orion/webui/treetable.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.treetable.TableTree(options)
Constructs a new TableTree with the given options.
|
Method Attributes | Method Name and Description |
---|---|
collapse(itemOrId)
|
|
destroy()
|
|
expand(itemOrId, postExpandFunc, args)
|
|
Returns this tree's indentation increment
|
|
getItem(itemOrId)
|
|
isExpanded(itemOrId)
|
|
refresh(item, children, forceExpand)
|
|
toggle(id)
|
- Parameters:
- options
- Parameters:
- itemOrId
- Parameters:
- itemOrId
- postExpandFunc
- args
- Parameters:
- itemOrId
- Parameters:
- itemOrId
- Parameters:
- item
- children
- forceExpand
- Parameters:
- id