org.jdesktop.swingx
Class JXTree.XTreeModelHandler

java.lang.Object
  extended by javax.swing.JTree.TreeModelHandler
      extended by org.jdesktop.swingx.JXTree.XTreeModelHandler
All Implemented Interfaces:
EventListener, TreeModelListener
Enclosing class:
JXTree

protected class JXTree.XTreeModelHandler
extends JTree.TreeModelHandler

Listens to the model and updates the expandedState accordingly when nodes are removed, or changed.

This class will expand an invisible root when a child has been added to it.


Constructor Summary
protected JXTree.XTreeModelHandler()
           
 
Method Summary
 void treeNodesInserted(TreeModelEvent e)
          Invoked after nodes have been inserted into the tree.
 
Methods inherited from class javax.swing.JTree.TreeModelHandler
treeNodesChanged, treeNodesRemoved, treeStructureChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JXTree.XTreeModelHandler

protected JXTree.XTreeModelHandler()
Method Detail

treeNodesInserted

public void treeNodesInserted(TreeModelEvent e)

Invoked after nodes have been inserted into the tree.

Use e.getPath() to get the parent of the new node(s). e.getChildIndices() returns the index(es) of the new node(s) in ascending order.

Specified by:
treeNodesInserted in interface TreeModelListener
Overrides:
treeNodesInserted in class JTree.TreeModelHandler