classpathhelper.util
Class AbstractTreeRoot

java.lang.Object
  extended byclasspathhelper.util.AbstractTree
      extended byclasspathhelper.util.AbstractTreeRoot
All Implemented Interfaces:
ITree, ITreeRoot
Direct Known Subclasses:
ClassLoaderElement, ClassLoaderElement, ClassLoaderElement, ClassLoaderElement

public abstract class AbstractTreeRoot
extends AbstractTree
implements ITreeRoot

Abstract base class for a tree root. The Tree root has additional methods for notifying listeners of tree events.

Usage

This class is intended to be extended to provide additional attributes.

Since:
1.0
Author:
bharris

Constructor Summary
AbstractTreeRoot()
           
 
Method Summary
 void addTreeNodeChangeListener(ITreeNodeChangeListener listener)
          Method for adding a node change listener.
 void addTreeStructureChangeListener(ITreeStructureChangeListener listener)
          Method for adding a tree structure change listener.
 void fireTreeNodeChangeEvent(ITree[] nodes)
          Method that fires a node change event.
 void fireTreeNodeChangeEvent(ITree[] nodes, java.lang.String[][] properties)
          Method that fires a node change event allowing details about the specific properties.
 void fireTreeStructureAddEvent(ITree parent, ITree[] children)
          Method that will fire a tree structure change event.
 void fireTreeStructureAddEvent(ITree parent, java.lang.String[] properties, ITree[] children)
          Method that will fire a tree structure change event.
 void fireTreeStructureRemoveEvent(ITree parent, ITree[] children)
          Method that will fire a tree structure change event.
 boolean removeTreeNodeChangeListener(ITreeNodeChangeListener listener)
          Method for removing a node change listener.
 boolean removeTreeStructureChangeListener(ITreeStructureChangeListener listener)
          Method for removing a tree structure change listener.
 
Methods inherited from class classpathhelper.util.AbstractTree
addChild, addChildren, getChildren, getParent, getRoot, hasChildren, removeAllChildren, removeChild, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface classpathhelper.util.ITree
getChildren, getIconName, getParent, hasChildren
 

Constructor Detail

AbstractTreeRoot

public AbstractTreeRoot()
Since:
1.0
Method Detail

fireTreeStructureAddEvent

public void fireTreeStructureAddEvent(ITree parent,
                                      ITree[] children)
Method that will fire a tree structure change event.

Specified by:
fireTreeStructureAddEvent in interface ITreeRoot
Parameters:
parent - The node whose structure has changed.
children - The children added to parent
Since:
1.0

fireTreeStructureAddEvent

public void fireTreeStructureAddEvent(ITree parent,
                                      java.lang.String[] properties,
                                      ITree[] children)
Method that will fire a tree structure change event.

Specified by:
fireTreeStructureAddEvent in interface ITreeRoot
Parameters:
parent - The node whose structure has changed.
properties - The properties of the parent that have changed due to the children getting added.
children - The children added to parent
Since:
1.1

fireTreeStructureRemoveEvent

public void fireTreeStructureRemoveEvent(ITree parent,
                                         ITree[] children)
Method that will fire a tree structure change event.

Specified by:
fireTreeStructureRemoveEvent in interface ITreeRoot
Parameters:
parent - The node whose structure has changed.
children - The children removed from parent.
Since:
1.0

addTreeStructureChangeListener

public void addTreeStructureChangeListener(ITreeStructureChangeListener listener)
Method for adding a tree structure change listener.

Specified by:
addTreeStructureChangeListener in interface ITreeRoot
Parameters:
listener - The listener.
Since:
1.0

removeTreeStructureChangeListener

public boolean removeTreeStructureChangeListener(ITreeStructureChangeListener listener)
Method for removing a tree structure change listener.

Specified by:
removeTreeStructureChangeListener in interface ITreeRoot
Parameters:
listener - The listener.
Returns:
true if the listener was removed, otherwise false.
Since:
1.0

fireTreeNodeChangeEvent

public void fireTreeNodeChangeEvent(ITree[] nodes)
Method that fires a node change event.

Specified by:
fireTreeNodeChangeEvent in interface ITreeRoot
Parameters:
nodes - The nodes that have changed.
Since:
1.0

fireTreeNodeChangeEvent

public void fireTreeNodeChangeEvent(ITree[] nodes,
                                    java.lang.String[][] properties)
Method that fires a node change event allowing details about the specific properties.

Specified by:
fireTreeNodeChangeEvent in interface ITreeRoot
Parameters:
nodes - The nodes that have changed.
properties - Properties for each node.
Since:
1.1

addTreeNodeChangeListener

public void addTreeNodeChangeListener(ITreeNodeChangeListener listener)
Method for adding a node change listener.

Specified by:
addTreeNodeChangeListener in interface ITreeRoot
Parameters:
listener - The listener.
Since:
1.0

removeTreeNodeChangeListener

public boolean removeTreeNodeChangeListener(ITreeNodeChangeListener listener)
Method for removing a node change listener.

Specified by:
removeTreeNodeChangeListener in interface ITreeRoot
Parameters:
listener - The listener.
Returns:
true if the listener was removed, otherwise false.
Since:
1.0