|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractTreeModel
org.zkoss.zkdemo.test2.tree.BinaryTreeModel
public class BinaryTreeModel
A simple implementation of binary tree model by an arraylist
| Constructor Summary | |
|---|---|
BinaryTreeModel(java.util.List tree)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns the child of parent at index index in the parent's child array. |
int |
getChildCount(java.lang.Object parent)
Returns the number of children of parent. |
boolean |
isLeaf(java.lang.Object node)
Returns true if node is a leaf. |
| Methods inherited from class org.zkoss.zul.AbstractTreeModel |
|---|
addTreeDataListener, fireEvent, getPath, getRoot, removeTreeDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryTreeModel(java.util.List tree)
tree - the list is contained all data of nodes.| Method Detail |
|---|
public java.lang.Object getChild(java.lang.Object parent,
int index)
TreeModel
parent - a node in the tree, obtained from this data source
public int getChildCount(java.lang.Object parent)
TreeModel
parent - a node in the tree, obtained from this data source
public boolean isLeaf(java.lang.Object node)
TreeModel
node - a node in the tree, obtained from this data source
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||