com.vividsolutions.jump.workbench.ui
Class RecursiveListener

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.RecursiveListener
All Implemented Interfaces:
java.awt.event.ContainerListener, java.util.EventListener
Direct Known Subclasses:
RecursiveKeyListener

public abstract class RecursiveListener
extends java.lang.Object
implements java.awt.event.ContainerListener

Listens to a component; if the component is a container, recursively listens to all children. If components are added or removed, the listener is added or removed. Usage:

new RecursiveListener(aComponent);

Uses:

Subclass and implement addListenerTo() and removeListenerFrom().

Author:
DeGroof, Steve. "Java Files."

Available from http://www.mindspring.com/~degroof/java/index.html. Internet; accessed 8 January 2003.
From the website: "The source code provided here should be considered example code. That is, you can use or modify it without permission. On the other hand, you're using the code at your own risk."


Constructor Summary
RecursiveListener(java.awt.Component component)
           
 
Method Summary
abstract  void addListenerTo(java.awt.Component comp)
           
 void componentAdded(java.awt.event.ContainerEvent evt)
           
 void componentRemoved(java.awt.event.ContainerEvent evt)
           
 void ignore(java.awt.Component comp)
           
 void listenTo(java.awt.Component comp)
           
abstract  void removeListenerFrom(java.awt.Component comp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveListener

public RecursiveListener(java.awt.Component component)
Method Detail

componentRemoved

public void componentRemoved(java.awt.event.ContainerEvent evt)
Specified by:
componentRemoved in interface java.awt.event.ContainerListener

componentAdded

public void componentAdded(java.awt.event.ContainerEvent evt)
Specified by:
componentAdded in interface java.awt.event.ContainerListener

listenTo

public void listenTo(java.awt.Component comp)

ignore

public void ignore(java.awt.Component comp)

addListenerTo

public abstract void addListenerTo(java.awt.Component comp)

removeListenerFrom

public abstract void removeListenerFrom(java.awt.Component comp)