com.myarch.treeiterator
Class SwingAdapter

java.lang.Object
  |
  +--com.myarch.treeiterator.SwingAdapter
All Implemented Interfaces:
TreeNodeAdapter

public class SwingAdapter
extends java.lang.Object
implements TreeNodeAdapter

TreeNodeAdapter implementation for javax.swing.tree.TreeNode


Constructor Summary
SwingAdapter()
           
 
Method Summary
 java.util.Iterator getChildren(java.lang.Object node)
          Returns java.util.Iterator to iterate over children of the node.
 boolean hasChildren(java.lang.Object node)
          Returns true if the node has children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingAdapter

public SwingAdapter()
Method Detail

getChildren

public java.util.Iterator getChildren(java.lang.Object node)
Returns java.util.Iterator to iterate over children of the node.
EnumarationAdapter is used since TreeNode doesn't implement the Iterator interface directly.
Specified by:
getChildren in interface TreeNodeAdapter
Parameters:
node - node
Returns:
java.util.Iterator for the collection that contains children of the given node.

hasChildren

public boolean hasChildren(java.lang.Object node)
Returns true if the node has children.
Specified by:
hasChildren in interface TreeNodeAdapter
Parameters:
node - node
Returns:
true if the node has children


Copyright © 2001 Alexander Ananiev & MyArch.com. All Rights Reserved.