SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class provides a simple treeview control.
This class is part of the module controls.
Constructor Summary | |
IWTreeView(parent)
Creates a new treeview under the specified parentNode. |
Method Summary | |
void
|
addNode(node)
Adds a new node to the treeview control. |
void
|
addNodes(nodes)
Adds an array of nodes to the treeview control. |
void
|
build()
Builds the tree. Call this method after you have registered the event handlers. |
HTMLDivElement
|
getContainer()
Returns the container of the treeview. |
IWNodeElement
|
getNodes()
Returns the array of {IWNodeElement} |
HTMLElement
|
getParent()
Returns the parent container of the treeview. |
IWTreeNode[]
|
getTreenodes()
Returns the tree nodes. |
Boolean
|
removeNode(node)
Removes a node from the treeview control. |
Event Summary | |
void
|
triggerOnFormatNode(event)
The onFormatNode event is fired before a node is appended to the tree.
Register an event listener with
|
void
|
triggerOnNodeClick(event)
The onNodeClick event is fired after a node has been clicked.
Register an event listener with
|
Constructor Detail |
IWTreeView(parent)
HTMLDivElement parent
- the container under which the treeview appears
Method Detail |
void addNode(node)
IWNodeElement node
void
void addNodes(nodes)
IWNodeElement[] nodes
- an array of nodes
void
void build()
void
HTMLDivElement getContainer()
HTMLDivElement
the container
IWNodeElement getNodes()
IWNodeElement
the nodes
HTMLElement getParent()
HTMLElement
the parent container
IWTreeNode[] getTreenodes()
IWTreeNode[]
the tree nodes
Boolean removeNode(node)
node
Boolean
Event Detail |
void triggerOnFormatNode(event)
onFormatNode
event is fired before a node is appended to the tree.
Register an event listener with
IWEventManager.addListener(yourTreeview, 'onformatnode', yourHandlerMethod(event));
to receive the
IWFormatNodeEvent
.
IWFormatNodeEvent event
- the format node event
void
void triggerOnNodeClick(event)
onNodeClick
event is fired after a node has been clicked.
Register an event listener with
IWEventManager.addListener(yourTreeview, 'onnodeclick', yourHandlerMethod(event));
to receive the
IWTreeNodeClickedEvent
.
IWTreeNodeClickedEvent event
- the node click event
void