de.grogra.util
Class SubTree

java.lang.Object
  extended by de.grogra.util.TreeModelSupport
      extended by de.grogra.util.SubTree
All Implemented Interfaces:
Disposable, java.util.EventListener, javax.swing.event.TreeModelListener, javax.swing.tree.TreeModel
Direct Known Subclasses:
UISubTree

public class SubTree
extends TreeModelSupport
implements javax.swing.tree.TreeModel, javax.swing.event.TreeModelListener, Disposable


Field Summary
protected  javax.swing.tree.TreePath pathToRoot
           
protected  javax.swing.tree.TreeModel tree
           
 
Fields inherited from class de.grogra.util.TreeModelSupport
NODES_CHANGED, NODES_INSERTED, NODES_REMOVED, STRUCTURE_CHANGED
 
Constructor Summary
SubTree(javax.swing.tree.TreeModel tree, javax.swing.tree.TreePath pathToRoot)
           
 
Method Summary
protected  void allListenersRemoved()
           
 void dispose()
           
protected  void disposeImpl()
           
protected  void firstListenerAdded()
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object parent)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object getRoot()
           
 boolean isLeaf(java.lang.Object node)
           
 void treeNodesChanged(javax.swing.event.TreeModelEvent e)
           
 void treeNodesInserted(javax.swing.event.TreeModelEvent e)
           
 void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
           
 void treeStructureChanged(javax.swing.event.TreeModelEvent e)
           
 void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
           
 
Methods inherited from class de.grogra.util.TreeModelSupport
addTreeModelListener, clearListeners, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, fireTreeModelEvent, hasListeners, removeTreeModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, removeTreeModelListener
 

Field Detail

pathToRoot

protected javax.swing.tree.TreePath pathToRoot

tree

protected javax.swing.tree.TreeModel tree
Constructor Detail

SubTree

public SubTree(javax.swing.tree.TreeModel tree,
               javax.swing.tree.TreePath pathToRoot)
Method Detail

allListenersRemoved

protected void allListenersRemoved()
Overrides:
allListenersRemoved in class TreeModelSupport

dispose

public final void dispose()
Specified by:
dispose in interface Disposable

disposeImpl

protected void disposeImpl()

firstListenerAdded

protected void firstListenerAdded()
Overrides:
firstListenerAdded in class TreeModelSupport

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel

getChildCount

public int getChildCount(java.lang.Object parent)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel

getRoot

public java.lang.Object getRoot()
Specified by:
getRoot in interface javax.swing.tree.TreeModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel

treeNodesChanged

public void treeNodesChanged(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesChanged in interface javax.swing.event.TreeModelListener

treeNodesInserted

public void treeNodesInserted(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesInserted in interface javax.swing.event.TreeModelListener

treeNodesRemoved

public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
Specified by:
treeNodesRemoved in interface javax.swing.event.TreeModelListener

treeStructureChanged

public void treeStructureChanged(javax.swing.event.TreeModelEvent e)
Specified by:
treeStructureChanged in interface javax.swing.event.TreeModelListener

valueForPathChanged

public void valueForPathChanged(javax.swing.tree.TreePath path,
                                java.lang.Object newValue)
Specified by:
valueForPathChanged in interface javax.swing.tree.TreeModel