Class TreeContentProvider
Object
|
+--ContentProvider
|
+--TreeContentProvider
- class
TreeContentProvider
- extends ContentProvider
Defined in tree_content_provider.js
TreeContentProvider
function TreeContentProvider()
_signalElementsAdded
function _signalElementsAdded(newElements, parent)
_signalElementsChanged
function _signalElementsChanged(changedElements)
_signalElementsRemoved
function _signalElementsRemoved(removedElements, parent)
getChildren
Array getChildren(<Object> parent)
Returns the children of parent
in an array. If
parent
has no children, return the empty array.
Parameters:
parent
- the object whose children are being requested
Returns:
the children of parent
, or the emty array if parent
has none
getElements
Array getElements()
getParent
Object getParent(<Object> child)
Returns the parent of child
. If the parent can't be
computed, return null
.
Parameters:
child
- the object whose parent is desired
Returns:
the parent of child
or null
if the parent can't be computed
getRootElements
Array getRootElements()
Returns an array of objects to display as the root nodes in the tree.
Returns:
the root elements in an array
hasChildren
boolean hasChildren(<Object> parent)
Returns true
if parent
has any children and
false
otherwise. The default implementation calls
getChildren(parent)
and checks the length of the
array, but subclasser's are expected to be able to find a faster way to
implement this method.
Parameters:
parent
- the object that may or may not have children
Returns:
true
if parent
has children and false
otherwise