|
qflib 0.98.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This extension of the TreeAdapter interface has to be implemented in order to support mutable tree hierarchies.
| Method Summary | |
boolean |
addNode(java.lang.Object parent,
int index,
java.lang.Object child)
Add a child at a given index to a node. |
boolean |
addNode(java.lang.Object parent,
java.lang.Object child)
Add a child to the end of a node's children. |
java.lang.Object |
cloneNode(java.lang.Object node)
Create a shallow copy of a node, similar to Object.clone, but with the parent of the copy
set to null. |
boolean |
insertNodeAfter(java.lang.Object parent,
java.lang.Object child,
java.lang.Object ref)
Insert a child node after another node. |
boolean |
insertNodeBefore(java.lang.Object parent,
java.lang.Object child,
java.lang.Object ref)
Insert a child node before another node. |
java.lang.Object |
removeNode(java.lang.Object parent,
int index)
Remove a child from a node at a given index. |
boolean |
removeNode(java.lang.Object parent,
java.lang.Object child)
Remove a child from the node. |
void |
setParentNode(java.lang.Object child,
java.lang.Object parent)
Set the parent of a node. |
| Methods inherited from interface de.qfs.lib.tree.TreeAdapter |
getChildCount, getChildNode, getChildren, getFirstChildNode, getIndexOfChildNode, getLastChildNode, getNextSibling, getParentNode, getPreviousSibling, isEnumerationBased, isIndexBased, isLeaf, isLinkBased |
| Method Detail |
public void setParentNode(java.lang.Object child,
java.lang.Object parent)
child - The node whose parent to set.parent - The parent to set.
public boolean addNode(java.lang.Object parent,
java.lang.Object child)
parent - The node to add the child to.child - The child to add.
public boolean removeNode(java.lang.Object parent,
java.lang.Object child)
parent - The node to remove the child from.child - The child to remove.
public boolean addNode(java.lang.Object parent,
int index,
java.lang.Object child)
parent - The node to add the child to.index - The index at which to insert.child - The child to insert.
public java.lang.Object removeNode(java.lang.Object parent,
int index)
throws java.lang.IndexOutOfBoundsException
parent - The node to remove the child from.index - The index from which to remove.java.lang.IndexOutOfBoundsException - If the index is invalid.
public boolean insertNodeBefore(java.lang.Object parent,
java.lang.Object child,
java.lang.Object ref)
parent - The node to add the child to.child - The child to insert.ref - The reference node to insert the child before.
public boolean insertNodeAfter(java.lang.Object parent,
java.lang.Object child,
java.lang.Object ref)
parent - The node to add the child to.child - The child to insert.ref - The reference node to insert the child after.public java.lang.Object cloneNode(java.lang.Object node)
Object.clone, but with the parent of the copy
set to null. Also the copy of the node should not have any children.
node - The node to copy.
|
qflib 0.98.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||