public class TreeExpansionHandler extends Object implements TreeExpansionListener, TreeModelListener
Constructor and Description |
---|
TreeExpansionHandler(JTree tree)
Create a tree expansion handler for a given tree.
|
Modifier and Type | Method and Description |
---|---|
void |
handleTreeStructureChanged(TreeModelEvent event,
TreePath root,
int i)
Handle each node in the subtree.
|
boolean |
isExpanded(TreePath path)
Test if a path is expanded or should be.
|
static boolean |
isTreeExpanded(JTree tree,
TreePath path)
Test if a tree node is expanded or should be.
|
void |
treeCollapsed(TreeExpansionEvent event)
Called whenever an item in the tree has been collapsed.
|
void |
treeExpanded(TreeExpansionEvent event)
Called whenever an item in the tree has been expanded.
|
void |
treeNodesChanged(TreeModelEvent event)
Invoked after a node (or a set of siblings) has changed in some way.
|
void |
treeNodesInserted(TreeModelEvent event)
Invoked after nodes have been inserted into the tree.
|
void |
treeNodesRemoved(TreeModelEvent event)
Invoked after nodes have been removed from the tree.
|
void |
treeStructureChanged(TreeModelEvent event)
Invoked after the tree has drastically changed structure from a
given node down.
|
public TreeExpansionHandler(JTree tree)
public void treeExpanded(TreeExpansionEvent event)
treeExpanded
in interface TreeExpansionListener
public void treeCollapsed(TreeExpansionEvent event)
treeCollapsed
in interface TreeExpansionListener
public void treeNodesChanged(TreeModelEvent event)
treeNodesChanged
in interface TreeModelListener
public void treeNodesInserted(TreeModelEvent event)
treeNodesInserted
in interface TreeModelListener
public void treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved
in interface TreeModelListener
public void treeStructureChanged(TreeModelEvent event)
treeStructureChanged
in interface TreeModelListener
public void handleTreeStructureChanged(TreeModelEvent event, TreePath root, int i)
public boolean isExpanded(TreePath path)
Copyright © 2012. All Rights Reserved.