|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--TreeNode | +--Tree
This class provides the methods to create an HTML tree dynamically. Creation usually takes the following form:
var tree = new Tree ('my tree'); var firstChild = tree.createNode (icon, 'tooltip text 1', value1); var secondChild = tree.createNode (icon, 'tooltip text 2', value2); tree.appendChild (firstChild); tree.appendChild (secondChild); tree.refresh(); tree.show();
Constructor Summary | |
Tree
(name)
|
Method Summary | |
function
|
clear()
Removes all tree nodes except for the root node. |
function
|
createNode(icon, tooltip, value, target)
Creates a new tree node. |
function
|
getNode(id)
Returns the node for the given branch id. |
function
|
hide()
Hides the tree (default). |
function
|
refresh()
Updates the HTML document (the tree view). |
function
|
show()
Visualizes the tree. |
function
|
updateDOM(node)
Private method used by the refresh() routine. |
Methods inherited from class TreeNode |
appendChild, firstChild, lastChild, nextSibling, isLastSibling, removeChild, hasChildren, getAllChildren
|
Constructor Detail |
function Tree(name)
name
- Tree name (warning: The name must be unique in case there are multiple trees within a single HTML document.)
Method Detail |
function clear()
function createNode(icon, tooltip, value, target)
target
- Tree event callbacks class instance, may be omitted.
value
- The tree node text.
icon
- The tree node icon (size must be 19x16)
tooltip
- The popup text shown when hoovering with the mouse over the tree node icon.
function getNode(id)
root: id = 0 first child of root: id = 0_1 second child of root: id = 0_2
id
- Branch id of the requested node.
function hide()
function refresh()
function show()
function updateDOM(node)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |