O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Event Adapters

Event adapters are objects that are interposed between event sources and event listeners. Adapters implement an event listener interface and decouple one or more event sources from one or more event listeners.

Figure 9-13 illustrates the relationships between an event source, adapter, and listener. The adapter class stands in as a listener for a particular event by implementing an appropriate listener interface. When the adapter receives an event, it forwards it to the listener. The adapter may choose to act upon the event either before the event is forwarded to the listener or afterwards. Some adapters may queue events for pending delivery, for instance, whereas others may filter events that are passed on to the listener.

Figure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required