com.partnersoft.swingform.testgui
Class Explorer

java.lang.Object
  extended by com.partnersoft.swingform.testgui.Explorer

public class Explorer
extends java.lang.Object

A file explorer-like tree control based on the more general JTree. Any changes made to the tree's ExplorerNodes show up in the control, unlike the DefaultMutableTreeNode where you have to pass changes through the model. Also, ExplorerNodes support icons and context menus.

Author:
Russell Cagle Copyright 2006 Partner Software, Inc.

Constructor Summary
Explorer()
           
 
Method Summary
 void addExplorerListener(ExplorerListener l)
           
 ExplorerNode getExplorerNode(java.lang.Object user)
          Horribly inefficient.
 ExplorerNode getRoot()
           
 javax.swing.JTree getTree()
           
protected  void notifyNodeAdded(ExplorerNode parent, ExplorerNode child)
           
protected  void notifyNodeChanged(ExplorerNode node)
           
protected  void notifyNodeRemoved(ExplorerNode parent, ExplorerNode child, int formerIndex)
           
protected  void notifyNodesChanged()
           
protected  void notifyNodesInserted()
           
protected  void notifyNodesRemoved()
           
protected  void notifyStructureChanged()
           
 void removeExplorerListener(ExplorerListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Explorer

public Explorer()
Method Detail

notifyNodeAdded

protected void notifyNodeAdded(ExplorerNode parent,
                               ExplorerNode child)

notifyNodeChanged

protected void notifyNodeChanged(ExplorerNode node)

notifyNodesChanged

protected void notifyNodesChanged()

notifyNodesInserted

protected void notifyNodesInserted()

notifyNodeRemoved

protected void notifyNodeRemoved(ExplorerNode parent,
                                 ExplorerNode child,
                                 int formerIndex)

notifyNodesRemoved

protected void notifyNodesRemoved()

notifyStructureChanged

protected void notifyStructureChanged()

addExplorerListener

public void addExplorerListener(ExplorerListener l)

getExplorerNode

public ExplorerNode getExplorerNode(java.lang.Object user)
Horribly inefficient. Does a linear search through the ExplorerNodes to find one with a matching CodexNode.

Parameters:
codexNode -
Returns:

getRoot

public ExplorerNode getRoot()

getTree

public javax.swing.JTree getTree()

removeExplorerListener

public void removeExplorerListener(ExplorerListener l)