com.tonbeller.wcf.tree
Class TreeModelDecorator
java.lang.Object
com.tonbeller.wcf.tree.TreeModelDecorator
- All Implemented Interfaces:
- DecoratedTreeModel, TreeModel
- Direct Known Subclasses:
- CachingTreeModelDecorator, EnumBoundedTreeModelDecorator, GroupingTreeModelDecorator, OptimizingTreeModelDecorator, SimpleOptimizingTreeModelDecorator
- public class TreeModelDecorator
- extends java.lang.Object
- implements TreeModel, DecoratedTreeModel
- Author:
- av
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeModelDecorator
public TreeModelDecorator()
TreeModelDecorator
public TreeModelDecorator(TreeModel decoree)
getRoots
public java.lang.Object[] getRoots()
- Description copied from interface:
TreeModel
- returns the root members of the tree.
- Specified by:
getRoots
in interface TreeModel
hasChildren
public boolean hasChildren(java.lang.Object node)
- Specified by:
hasChildren
in interface TreeModel
- Returns:
- true if the member can be expanded
getChildren
public java.lang.Object[] getChildren(java.lang.Object node)
- Specified by:
getChildren
in interface TreeModel
- Returns:
- the children of the member
getParent
public java.lang.Object getParent(java.lang.Object node)
- Specified by:
getParent
in interface TreeModel
- Returns:
- the parent of member or null, if this is a root member
addTreeModelChangeListener
public void addTreeModelChangeListener(TreeModelChangeListener l)
- Specified by:
addTreeModelChangeListener
in interface TreeModel
removeTreeModelChangeListener
public void removeTreeModelChangeListener(TreeModelChangeListener l)
- Specified by:
removeTreeModelChangeListener
in interface TreeModel
fireModelChanged
public void fireModelChanged(boolean identityChanged)
- Description copied from interface:
TreeModel
- fires a TreeModelChangeEvent.
- Specified by:
fireModelChanged
in interface TreeModel
- Parameters:
identityChanged
- if true, the identities of the tree nodes
have changed and, for example, the selection will be cleared.
getDecoree
public TreeModel getDecoree()
- Specified by:
getDecoree
in interface DecoratedTreeModel
setDecoree
public void setDecoree(TreeModel model)