|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITreeModel<T>
The base model for a Tree. This encapsulates the knowledge about a tree, and returns tree-based context information for when the tree is being built.
Method Summary | |
---|---|
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. |
Method Detail |
---|
int getChildCount(@Nonnull T item) throws java.lang.Exception
item
-
java.lang.Exception
boolean hasChildren(@Nonnull T item) throws java.lang.Exception
item
-
java.lang.Exception
@Nonnull T getRoot() throws java.lang.Exception
java.lang.Exception
@Nonnull T getChild(@Nonnull T parent, int index) throws java.lang.Exception
parent
- index
-
java.lang.Exception
T getParent(@Nonnull T child) throws java.lang.Exception
child
-
java.lang.Exception
void addChangeListener(@Nonnull ITreeModelChangedListener<T> l)
l
- void removeChangeListener(@Nonnull ITreeModelChangedListener<T> l)
l
- void expandChildren(@Nonnull T item) throws java.lang.Exception
item
-
java.lang.Exception
void collapseChildren(@Nonnull T item) throws java.lang.Exception
item
-
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |