1. /*
  2. * @(#)AWTEventListener.java 1.8 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.awt.event;
  8. import java.util.EventListener;
  9. import java.awt.AWTEvent;
  10. /**
  11. * The listener interface for receiving notification of events
  12. * dispatched to objects that are instances of Component or
  13. * MenuComponent or their subclasses. Unlike the other EventListeners
  14. * in this package, AWTEventListeners passively observe events
  15. * being dispatched in the AWT, system-wide. Most applications
  16. * should never use this class; applications which might use
  17. * AWTEventListeners include event recorders for automated testing,
  18. * and facilities such as the Java Accessibility package.
  19. * <p>
  20. * The class that is interested in monitoring AWT events
  21. * implements this interface, and the object created with that
  22. * class is registered with the Toolkit, using the Toolkit's
  23. * <code>addAWTEventListener</code> method. When an event is
  24. * dispatched anywhere in the AWT, that object's
  25. * <code>eventDispatcheded</code> method is invoked.
  26. *
  27. * @see java.awt.AWTEvent
  28. * @see java.awt.Toolkit#addAWTEventListener
  29. * @see java.awt.Toolkit#removeAWTEventListener
  30. *
  31. * @author Fred Ecks
  32. * @version 1.8, 01/23/03
  33. * @since 1.2
  34. */
  35. public interface AWTEventListener extends EventListener {
  36. /**
  37. * Invoked when an event is dispatched in the AWT.
  38. */
  39. public void eventDispatched(AWTEvent event);
  40. }