kiwi.ui.model
Class DynamicTreeModel
java.lang.Object
|
+--kiwi.ui.model.StaticTreeModel
|
+--kiwi.ui.model.DynamicTreeModel
- public class DynamicTreeModel
- extends StaticTreeModel
- implements ITreeModel
An implementation of ITreeModel
that represents a dynamic
hierarchical data structure. The model loads the children of a node when
the node is expanded and discards them when it is collapsed; no caching is
done.
- Version:
- 1.0 (05/98)
- Author:
- Mark Lindner, PING Software Group
- See Also:
StaticTreeModel
Methods inherited from class kiwi.ui.model.StaticTreeModel |
addTreeModelListener,
fireNodeAdded,
fireNodeChanged,
fireNodeCollapsed,
fireNodeCollapsing,
fireNodeExpanded,
fireNodeExpanding,
fireNodeRemoved,
fireNodeStructureChanged,
getChildCount,
getChildren,
getParent,
getRoot,
getValueForProperty,
isExpandable,
isExpanded,
loadChildren,
removeTreeModelListener,
unloadChildren |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DynamicTreeModel
public DynamicTreeModel(HierarchicalDataSource source)
- Construct a new
DynamicTreeModel
.
- Parameters:
source
- The data source that will be providing nodes for this
model.
expand
public void expand(ITreeNode node)
- Expand a node. Expanding a node initiates the loading of its children.
The model will fire a
TreeModelEvent
to notify listeners
when the children have been loaded.
- Specified by:
- expand in interface ITreeModel
- Parameters:
node
- The node to expand.- Overrides:
- expand in class StaticTreeModel
- See Also:
collapse(kiwi.ui.model.ITreeNode)
collapse
public void collapse(ITreeNode node)
- Collapse a node. Collapsing a node initiates the disposal of its
children. The model will fire a
TreeModelEvent
to notify
listeners when the children have been disposed.
- Specified by:
- collapse in interface ITreeModel
- Parameters:
node
- The node to collapse.- Overrides:
- collapse in class StaticTreeModel
- See Also:
expand(kiwi.ui.model.ITreeNode)