javax.swing

Class JTree.TreeModelHandler

protected class JTree.TreeModelHandler extends Object implements TreeModelListener

Listens to the model of the JTree and updates the property expandedState if nodes are removed or changed.
Constructor Summary
protected TreeModelHandler()
Creates a new instance of TreeModelHandler.
Method Summary
voidtreeNodesChanged(TreeModelEvent ev)
Notifies when a node has changed in some ways.
voidtreeNodesInserted(TreeModelEvent ev)
Notifies when a node is inserted into the tree.
voidtreeNodesRemoved(TreeModelEvent ev)
Notifies when a node is removed from the tree.
voidtreeStructureChanged(TreeModelEvent ev)
Notifies when the structure of the tree is changed.

Constructor Detail

TreeModelHandler

protected TreeModelHandler()
Creates a new instance of TreeModelHandler.

Method Detail

treeNodesChanged

public void treeNodesChanged(TreeModelEvent ev)
Notifies when a node has changed in some ways. This does not include that a node has changed its location or changed it's children. It only means that some attributes of the node have changed that might affect its presentation. This method is called after the actual change occured.

Parameters: ev the TreeModelEvent describing the change

treeNodesInserted

public void treeNodesInserted(TreeModelEvent ev)
Notifies when a node is inserted into the tree. This method is called after the actual change occured.

Parameters: ev the TreeModelEvent describing the change

treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent ev)
Notifies when a node is removed from the tree. This method is called after the actual change occured.

Parameters: ev the TreeModelEvent describing the change

treeStructureChanged

public void treeStructureChanged(TreeModelEvent ev)
Notifies when the structure of the tree is changed. This method is called after the actual change occured.

Parameters: ev the TreeModelEvent describing the change