Listener : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

Listener
If an object is interested in hearing about events generated in some component, it may register itself as a listener for that type of event. If your component uses an anonymous inner class that extends one of the eventListenerAdapter classes, it can register itself as a listener for any class of event. This won’t interfere with subclasses doing the same thing. Everybody gets notified. event.consume() is the way a subclass can suppress a superclass seeing the event too.

addXXXListener is not smart enough to avoid adding a listerner twice if it is already added. removeXXXListener is not smart enough to remove all copies of this component if it has been inadvertently added more than once. If your component keeps listening after the remove, check the list of listeners for duplicates with getXXXListeners.


This page is posted
on the web at:

http://mindprod.com/jgloss/listener.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\listener.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.142.53.68]
You are visitor number