java.awt.event
Class AWTEventListenerProxy

java.lang.Object
  extended by java.util.EventListenerProxy
      extended by java.awt.event.AWTEventListenerProxy
All Implemented Interfaces:
AWTEventListener, EventListener

public class AWTEventListenerProxy
extends EventListenerProxy
implements AWTEventListener

This class allows adding an AWTEventListener which only pays attention to a specific event mask.

Since:
1.4
See Also:
Toolkit, EventListenerProxy

Constructor Summary
AWTEventListenerProxy(long eventMask, AWTEventListener listener)
          Construct an AWT Event Listener which only listens to events in the given mask, passing the work on to the real listener.
 
Method Summary
 void eventDispatched(AWTEvent event)
          Forwards events on to the delegate.
 long getEventMask()
          This returns the event mask associated with this listener.
 
Methods inherited from class java.util.EventListenerProxy
getListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTEventListenerProxy

public AWTEventListenerProxy(long eventMask,
                             AWTEventListener listener)
Construct an AWT Event Listener which only listens to events in the given mask, passing the work on to the real listener.

Parameters:
eventMask - the mask of events to listen to
listener - the wrapped listener
Method Detail

eventDispatched

public void eventDispatched(AWTEvent event)
Forwards events on to the delegate.

Specified by:
eventDispatched in interface AWTEventListener
Parameters:
event - the to forward to the delagate listener
Throws:
NullPointerException - if the delegate this was created with is null

getEventMask

public long getEventMask()
This returns the event mask associated with this listener.

Returns:
the event mask