|
||||||||||
| 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.TreeModelA
public class TreeModelA
A simple implementation of TreeModel.
| Constructor Summary | |
|---|---|
TreeModelA(java.lang.Object root)
Constructor. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object parent,
java.lang.Object[] newNodes)
append new nodes which parent is parent
by new nodes newNodes |
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. |
java.lang.Object |
getRoot()
Return the root of tree |
void |
insert(java.lang.Object parent,
int indexFrom,
int indexTo,
java.lang.Object[] newNodes)
insert new nodes which parent is parent with indexes indexes
by new nodes newNodes |
boolean |
isLeaf(java.lang.Object node)
Returns true if node is a leaf. |
void |
remove(java.lang.Object parent,
int indexFrom,
int indexTo)
remove the nodes which parent is parent with indexes indexes |
void |
set(java.lang.Object parent,
int indexFrom,
int indexTo,
java.lang.Object[] values)
Modify the nodes which parent is parent with indexes indexes by
values |
| Methods inherited from class org.zkoss.zul.AbstractTreeModel |
|---|
addTreeDataListener, fireEvent, getPath, removeTreeDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeModelA(java.lang.Object root)
root - - the root of tree| Method Detail |
|---|
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
public java.lang.Object getChild(java.lang.Object parent,
int index)
TreeModel
parent - a node in the tree, obtained from this data source
public java.lang.Object getRoot()
AbstractTreeModel
getRoot in interface TreeModelgetRoot in class AbstractTreeModel
public void set(java.lang.Object parent,
int indexFrom,
int indexTo,
java.lang.Object[] values)
throws java.lang.IndexOutOfBoundsException
parent with indexes indexes by
values
parent - The parent of nodes are modifiedindexFrom - the lower index of the change rangeindexTo - the upper index of the change rangevalues - The new values of nodes are modified
java.lang.IndexOutOfBoundsException - - indexFrom < 0 or indexTo > number of parent's children
public void remove(java.lang.Object parent,
int indexFrom,
int indexTo)
throws java.lang.IndexOutOfBoundsException
parent with indexes indexes
parent - The parent of nodes are removedindexFrom - the lower index of the change rangeindexTo - the upper index of the change range
java.lang.IndexOutOfBoundsException - - indexFrom < 0 or indexTo > number of parent's children
public void add(java.lang.Object parent,
java.lang.Object[] newNodes)
parent
by new nodes newNodes
parent - The parent of nodes are appendednewNodes - New nodes which are appended
public void insert(java.lang.Object parent,
int indexFrom,
int indexTo,
java.lang.Object[] newNodes)
throws java.lang.IndexOutOfBoundsException
parent with indexes indexes
by new nodes newNodes
parent - The parent of nodes are insertedindexFrom - the lower index of the change rangeindexTo - the upper index of the change rangenewNodes - New nodes which are inserted
java.lang.IndexOutOfBoundsException - - indexFrom < 0 or indexTo > number of parent's children
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||