xdoclet.gui
Class BeanContextTreeModel

java.lang.Object
  |
  +--xdoclet.gui.BeanContextTreeModel
All Implemented Interfaces:
BeanContextMembershipListener, EventListener, TreeModel

public class BeanContextTreeModel
extends Object
implements TreeModel, BeanContextMembershipListener

This is a TreeModel for BeanContexts modeled after Swing's TreeModel interface. It can also be used to populate an Eclipse Tree.

Version:
$Revision: 1.7 $
Author:
Aslak Hellesøy

Constructor Summary
BeanContextTreeModel(BeanContextSupportEx root)
           
 
Method Summary
 void addTreeModelListener(TreeModelListener l)
           
 void childrenAdded(BeanContextMembershipEvent bcme)
           
 void childrenRemoved(BeanContextMembershipEvent bcme)
           
 Object getChild(Object parent, int index)
           
 int getChildCount(Object parent)
           
 int getIndexOfChild(Object parent, Object child)
           
 BeanContextSupportEx[] getPathToRoot(BeanContextSupportEx aNode)
           
 Object getRoot()
           
 boolean isLeaf(Object node)
           
 void removeTreeModelListener(TreeModelListener l)
           
 void valueForPathChanged(TreePath path, Object newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanContextTreeModel

public BeanContextTreeModel(BeanContextSupportEx root)
Method Detail

getRoot

public Object getRoot()
Specified by:
getRoot in interface TreeModel

getChild

public Object getChild(Object parent,
                       int index)
Specified by:
getChild in interface TreeModel

getChildCount

public int getChildCount(Object parent)
Specified by:
getChildCount in interface TreeModel

isLeaf

public boolean isLeaf(Object node)
Specified by:
isLeaf in interface TreeModel

valueForPathChanged

public void valueForPathChanged(TreePath path,
                                Object newValue)
Specified by:
valueForPathChanged in interface TreeModel

getIndexOfChild

public int getIndexOfChild(Object parent,
                           Object child)
Specified by:
getIndexOfChild in interface TreeModel

addTreeModelListener

public void addTreeModelListener(TreeModelListener l)
Specified by:
addTreeModelListener in interface TreeModel

removeTreeModelListener

public void removeTreeModelListener(TreeModelListener l)
Specified by:
removeTreeModelListener in interface TreeModel

getPathToRoot

public BeanContextSupportEx[] getPathToRoot(BeanContextSupportEx aNode)

childrenAdded

public void childrenAdded(BeanContextMembershipEvent bcme)
Specified by:
childrenAdded in interface BeanContextMembershipListener

childrenRemoved

public void childrenRemoved(BeanContextMembershipEvent bcme)
Specified by:
childrenRemoved in interface BeanContextMembershipListener


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.