org.xnap.commons.gui.util
Class ComponentIterator

java.lang.Object
  extended by org.xnap.commons.gui.util.ComponentIterator
All Implemented Interfaces:
Iterator<Component>

public class ComponentIterator
extends Object
implements Iterator<Component>

Provides an iterator that traverses a component's hierarchy in preorder.

Author:
Steffen Pingel

Constructor Summary
ComponentIterator(Component component)
          Iterate over hierarchy of component.
 
Method Summary
 boolean hasNext()
           
 Component next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentIterator

public ComponentIterator(Component component)
Iterate over hierarchy of component. First call to next will return component.

Method Detail

remove

public void remove()
Not supported.

Specified by:
remove in interface Iterator<Component>
Throws:
UnsupportedOperationException

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Component>

next

public Component next()
Specified by:
next in interface Iterator<Component>


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.