public interface TreeNodeCollection extends WrappedResource, java.lang.Iterable<TreeNodeResource>, RemoveNode
Modifier and Type | Method and Description |
---|---|
handle |
add()
Adds a new tree node as a last node relative to the root tree node.
|
handle |
add(NumberType anchorIndex,
NumberType relationType,
character key,
character text)
Adds a new tree node as a first, last, next, previous or child node relative to the anchor
node given by its index.
|
handle |
add(NumberType anchorIndex,
NumberType relationType,
character key,
character text,
NumberType nodeIcon,
NumberType selectedNodeIcon)
Adds a new tree node as a first, last, next, previous or child node relative to the anchor
node given by its index.
|
handle |
addChildNode(handle relativeNode,
character key,
character text)
Creates a new node and inserts it as the last child item relative to the supplied node.
|
handle |
addFirstNode(character key,
character text)
Creates a new node and inserts it as the first item in the collection.
|
handle |
addLastNode(character key,
character text)
Creates a new node and inserts it as the last item in the collection.
|
handle |
addNextNode(handle relativeNode,
character key,
character text)
Creates a new node and inserts it as the next item relative to the supplied node.
|
void |
clearNodes()
Removes all the nodes from the collections and all the child nodes recursively.
|
integer |
getCount()
Returns the count of all the items in this collection.
|
handle |
getItem(NumberType nodeIndex)
Returns the node at the specified index.
|
integer |
getNodeCount()
Returns the count of all the items in this collection.
|
handle |
getTreeNode(character key)
Returns the node of the specified key.
|
handle |
getTreeNode(NumberType index)
Returns the node at the specified index.
|
void |
remove(BaseDataType nodeKeyOrIndex)
Removes the node with the specified key or index.
|
void |
removeNode(character key)
Removes the node of the specified key.
|
id, id, unknown, valid
removeNode
handle addFirstNode(character key, character text)
key
- The key of the new node.text
- The text of the new node.handle addLastNode(character key, character text)
key
- The key of the new node.text
- The text of the new node.TreeViewNode
resource if the operation is successful, unknown otherwise.handle addNextNode(handle relativeNode, character key, character text)
relativeNode
- The relative node, wrapped resource of the type TreeViewNode
.key
- The key of the new node.text
- The text of the new node.handle addChildNode(handle relativeNode, character key, character text)
relativeNode
- The relative node, wrapped resource of the type TreeViewNode
.key
- The key of the new node.text
- The text of the new node.void removeNode(character key)
key
- A valid node key.void remove(BaseDataType nodeKeyOrIndex)
nodeKeyOrIndex
- either an integer node index, 1-based, or character node key.void clearNodes()
integer getNodeCount()
integer getCount()
handle add(NumberType anchorIndex, NumberType relationType, character key, character text)
anchorIndex
- The anchor node indexrelationType
- The relation type: first(0), last(1), next(2), previous(3) and child(4)key
- The key of the new nodetext
- The label of the new nodehandle add(NumberType anchorIndex, NumberType relationType, character key, character text, NumberType nodeIcon, NumberType selectedNodeIcon)
anchorIndex
- The anchor node indexrelationType
- The relation type: first(0), last(1), next(2), previous(3) and child(4)key
- The key of the new nodetext
- The label of the new nodenodeIcon
- The node icon 1-based index within its tree images listselectedNodeIcon
- The node icon 1-based index within its tree images listhandle add()
handle getTreeNode(NumberType index)
index
- A valid index.TreeViewNode
or unknown if the node not found.handle getTreeNode(character key)
key
- A valid key.handle getItem(NumberType nodeIndex)
nodeIndex
- The node index.unknown
when the invalid index is provided.