com.vividsolutions.jump.workbench.ui
Class RecursiveListener
java.lang.Object
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:
- add a KeyListener to all components in an application to
watch for global function keys
- add a FocusListener to all components in a scrollable panel
to allow auto scrolling on tab
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."
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecursiveListener
public RecursiveListener(java.awt.Component component)
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)