Tree Model"
From Documentation
m |
|||
Line 14: | Line 14: | ||
! Version !! Date !! Content | ! Version !! Date !! Content | ||
|- | |- | ||
− | | | + | | 5.0.6 |
− | | | + | | January 2011 |
− | | | + | | <javadoc type="interface">org.zkoss.zul.TreeNode</javadoc>, <javadoc>org.zkoss.zul.DefaultTreeNode</javadoc> and <javadoc>org.zkoss.zul.DefaultTreeModel</javadoc> were intrdocued. |
|} | |} | ||
{{ZKDevelopersReferencePageFooter}} | {{ZKDevelopersReferencePageFooter}} |
Revision as of 06:20, 6 January 2011
Here we describe how to implement a tree model (TreeModel). For the concept about component, model and render, please refer to the Model-driven Display section.
A tree model is used to control how to display a tree-like component, such as Tree.
Instead of implementing TreeModel from scratch, it is suggested to extend from AbstractTreeModel, which will handle the data listeners transparently.
In additions, if the tree is small enough to be loaded completely, you could use the default implementation, SimpleTreeModel, which uses SimpleTreeNode to construct a tree, and it assumes the tree is immutable.
Version History
Version | Date | Content |
---|---|---|
5.0.6 | January 2011 | TreeNode, DefaultTreeNode and DefaultTreeModel were intrdocued. |