public interface ITreeModel<T>
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ITreeModelChangedListener<T> l)
Add a listener to be called when nodes on the tree change.
|
void |
collapseChildren(T item)
Called when this node's children are to be collapsed.
|
void |
expandChildren(T item)
Called when this node is attempted to be expanded.
|
T |
getChild(T parent,
int index)
Returns the nth child in the parent's list.
|
int |
getChildCount(T item)
Returns the #of children for this object.
|
T |
getParent(T child)
Get the parent node of a child in the tree.
|
T |
getRoot()
Get the root object of the tree.
|
boolean |
hasChildren(T item)
If possible this should quickly decide if a tree node has children or not.
|
void |
removeChangeListener(ITreeModelChangedListener<T> l)
Remove a registered change listener.
|
int getChildCount(@Nullable T item) throws Exception
item - Exceptionboolean hasChildren(@Nullable T item) throws Exception
item - Exception@Nullable T getRoot() throws Exception
Exception@Nonnull T getChild(@Nullable T parent, int index) throws Exception
parent - index - Exception@Nullable T getParent(@Nullable T child) throws Exception
child - Exceptionvoid addChangeListener(@Nonnull ITreeModelChangedListener<T> l)
l - void removeChangeListener(@Nonnull ITreeModelChangedListener<T> l)
l - void expandChildren(@Nullable T item) throws Exception
item - ExceptionCopyright © 2017 etc.to. All rights reserved.