edu.umd.cs.jazz.event
Class ZFilteredEventHandler.ZFilteredEventDispatcher

java.lang.Object
  |
  +--edu.umd.cs.jazz.event.ZFilteredEventHandler.ZFilteredEventDispatcher
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener, ZMouseListener, ZMouseMotionListener
Enclosing class:
ZFilteredEventHandler

public class ZFilteredEventHandler.ZFilteredEventDispatcher
extends java.lang.Object
implements ZMouseListener, ZMouseMotionListener, java.awt.event.KeyListener

ZFilteredEventDispatcher is used internally to register with the filtered event sources. It applies the filter to incoming events. If the event passes the filter then it updates the current filtered mouse event variable (see getCurrentFilteredMouseEvent) and calls the appropriate 'filtered*' template method.


Constructor Summary
ZFilteredEventHandler.ZFilteredEventDispatcher()
           
 
Method Summary
 void keyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has is pressed on the key event souce.
 void keyReleased(java.awt.event.KeyEvent e)
          Invoked when a key is released on the key event souce.
 void keyTyped(java.awt.event.KeyEvent e)
          Invoked when a key is typed on the key event souce.
 void mouseClicked(ZMouseEvent e)
          Invoked when the mouse is clicked the mouse event source.
 void mouseDragged(ZMouseEvent e)
          Invoked when a mouse button is pressed on the mouse event source and then dragged.
 void mouseEntered(ZMouseEvent e)
          Invoked when the mouse enters the mouse event source.
 void mouseExited(ZMouseEvent e)
          Invoked when the mouse exits the mouse event source.
 void mouseMoved(ZMouseEvent e)
          Invoked when the mouse button is moved on the mouse event source.
 void mousePressed(ZMouseEvent e)
          Invoked when the mouse is pressed on the mouse event source.
 void mouseReleased(ZMouseEvent e)
          Invoked when the mouse is released on the mouse event source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZFilteredEventHandler.ZFilteredEventDispatcher

public ZFilteredEventHandler.ZFilteredEventDispatcher()
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Invoked when a key has is pressed on the key event souce. Forwards the event to filteredKeyPressed if the current event filter accepts the event.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Parameters:
e - the key event.

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Invoked when a key is released on the key event souce. Forwards the event to filteredKeyReleased if the current event filter accepts the event.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Parameters:
e - the key event.

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Invoked when a key is typed on the key event souce. Forwards the event to filteredKeyTyped if the current event filter accepts the event. This event occurs when a key press is followed by a key release.

Specified by:
keyTyped in interface java.awt.event.KeyListener
Parameters:
e - the key event.

mouseClicked

public void mouseClicked(ZMouseEvent e)
Invoked when the mouse is clicked the mouse event source. If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMouseClicked. After filteredMouseClicked returns the current event is set to null.

Specified by:
mouseClicked in interface ZMouseListener
Parameters:
e - the mouse clicked event.

mouseDragged

public void mouseDragged(ZMouseEvent e)
Invoked when a mouse button is pressed on the mouse event source and then dragged. Mouse drag events will continue to be delivered to the object where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the object). If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMouseDragged. After filteredMouseDragged returns the current event is set to null.

Specified by:
mouseDragged in interface ZMouseMotionListener
Parameters:
e - the mouse dragged event.

mouseEntered

public void mouseEntered(ZMouseEvent e)
Invoked when the mouse enters the mouse event source. If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMouseEntered. After filteredMouseEntered returns the current event is set to null.

Specified by:
mouseEntered in interface ZMouseListener
Parameters:
e - the mouse entered event.

mouseExited

public void mouseExited(ZMouseEvent e)
Invoked when the mouse exits the mouse event source. If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMouseExited. After filteredMouseExited returns the current event is set to null.

Specified by:
mouseExited in interface ZMouseListener
Parameters:
e - the mouse exited event.

mouseMoved

public void mouseMoved(ZMouseEvent e)
Invoked when the mouse button is moved on the mouse event source. (with no buttons down) If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMouseMoved. After filteredMouseMovde returns the current event is set to null.

Specified by:
mouseMoved in interface ZMouseMotionListener
Parameters:
e - the mouse moved event.

mousePressed

public void mousePressed(ZMouseEvent e)
Invoked when the mouse is pressed on the mouse event source. If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMousePressed. After filteredMousePressed returns the current event is set to null.

Specified by:
mousePressed in interface ZMouseListener
Parameters:
e - the mouse pressed event.

mouseReleased

public void mouseReleased(ZMouseEvent e)
Invoked when the mouse is released on the mouse event source. If the current event filter accepts the event then the event is set as the current event and is forwarded to filteredMousePressed. After filteredMousePressed returns the current event is set to null.

Specified by:
mouseReleased in interface ZMouseListener
Parameters:
e - the mouse pressed event.


Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.