creamtec.core.awt
Class ContainerIterator

java.lang.Object
  extended by creamtec.core.awt.ContainerIterator

public class ContainerIterator
extends java.lang.Object

Provides iteration of the container tree with a callback method. Iterates all children of the container recursing into subcontainers and calls processComponent method of the Listener interface on each contained component


Nested Class Summary
static interface ContainerIterator.Listener
          Users of the class must implement this Listener interface to process iterated components
 
Constructor Summary
ContainerIterator(ContainerIterator.Listener listener)
          Initializes the container and associates a listener with it By default, invisible components are not processed
ContainerIterator(ContainerIterator.Listener listener, boolean iterateInvisible)
          Initializes the container
 
Method Summary
 void iterate(java.awt.Component comp)
          Recurses the container tree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerIterator

public ContainerIterator(ContainerIterator.Listener listener)
Initializes the container and associates a listener with it By default, invisible components are not processed


ContainerIterator

public ContainerIterator(ContainerIterator.Listener listener,
                         boolean iterateInvisible)
Initializes the container

Parameters:
listener - a callback object, that is interested in component processing
iterateInvisible - if false, the callback will not be called on invisible components
Method Detail

iterate

public void iterate(java.awt.Component comp)
             throws java.lang.Exception
Recurses the container tree

Throws:
java.lang.Exception


Copyright © 2000-2006 CreamTec LLC. All Rights Reserved.