com.metamatrix.console.ui.util
Class LazyBranchListener

java.lang.Object
  extended by com.metamatrix.console.ui.util.LazyBranchListener
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TreeWillExpandListener

public class LazyBranchListener
extends java.lang.Object
implements javax.swing.event.TreeWillExpandListener

LazyBranchListener is used with LazyBranchNode to call populate() on their nodes. To use, instantiate this class and call addTreeWillExpandListener() on the tree. Example:

     public JTree buildTree() {
         MyLazyBranchNode root = new MyLazyBranchNode(getRootObject());
         JTree myTree = new JTree(root);
         myTree.addTreeWillExpandListener(new LazyBranchListener());
         return myTree;
     }
 

See Also:
LazyBranchNode

Constructor Summary
LazyBranchListener()
           
 
Method Summary
 void treeWillCollapse(javax.swing.event.TreeExpansionEvent e)
           
 void treeWillExpand(javax.swing.event.TreeExpansionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyBranchListener

public LazyBranchListener()
Method Detail

treeWillCollapse

public void treeWillCollapse(javax.swing.event.TreeExpansionEvent e)
Specified by:
treeWillCollapse in interface javax.swing.event.TreeWillExpandListener

treeWillExpand

public void treeWillExpand(javax.swing.event.TreeExpansionEvent e)
Specified by:
treeWillExpand in interface javax.swing.event.TreeWillExpandListener


Copyright © 2009. All Rights Reserved.