Class orion.treeIterator.TreeIterator
A tree model based iterator component.
Defined in: </shared/eclipse/e4/orion/I201202031415/plugins/org.eclipse.orion.client.core/web/orion/treeIterator.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.treeIterator.TreeIterator(firstLevelChildren, options)
Creates a new tree iterator.
|
Method Attributes | Method Name and Description |
---|---|
collapse(collapsedModel)
When the parent model containing the cursor is collapsed, the cursor has to be surfaced to the parent
|
|
cursor()
Get current selected model by the iteration
|
|
Convenient method to see if last iterate action moved the cursor
|
|
iterate(forward, forceExpand)
Iterate from the current cursor
|
|
Get previously selected model by the iteration
|
|
reset()
Reset cursor and previous cursor
|
|
setCursor(the)
Set the cursor to the given model
|
|
setTree(the)
Set the the first level children
|
Class Detail
orion.treeIterator.TreeIterator(firstLevelChildren, options)
Creates a new tree iterator.
- Parameters:
- {list} firstLevelChildren
- The first level children of the tree root, each item has children and parent property recursively.
- {Object} options
- The options object which provides iterate patterns and all call back functions when iteration happens.
Method Detail
collapse(collapsedModel)
When the parent model containing the cursor is collapsed, the cursor has to be surfaced to the parent
- Parameters:
- collapsedModel
cursor()
Get current selected model by the iteration
cursorMoved()
Convenient method to see if last iterate action moved the cursor
iterate(forward, forceExpand)
Iterate from the current cursor
- Parameters:
- {boolean} forward
- the iteration direction. If true then iterate to next, otherwise previous.
- {boolean} forceExpand
- optional. the flag for the current cursor to dive into its children. If the cursor has no children yet or its children are not expanded, this method will call forceExpandFunc. If there is no forceExpandFunc defined it will not expand.
prevCursor()
Get previously selected model by the iteration
reset()
Reset cursor and previous cursor
setCursor(the)
Set the cursor to the given model
- Parameters:
- {Object} the
- given model
setTree(the)
Set the the first level children
- Parameters:
- {list} the
- first level children