Tree Model

From Documentation
Revision as of 05:05, 3 January 2011 by Tomyeh (talk | contribs)

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

Last Update : 2011/01/03


Version Date Content
     



Last Update : 2011/01/03

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.