edu.umd.cs.jazz.event
Class ZMouseAdapter

java.lang.Object
  |
  +--edu.umd.cs.jazz.event.ZMouseAdapter
All Implemented Interfaces:
java.util.EventListener, ZMouseListener

public abstract class ZMouseAdapter
extends java.lang.Object
implements ZMouseListener

ZMouseAdapter is an abstract adapter class for receiving mouse events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse events let you track when a mouse is pressed, released, clicked, when it enters a node, and when it exits. (To track mouse moves and mouse drags, use the ZMouseMotionAdapter.)

Extend this class to create a ZMouseEvent listener and override the methods for the events of interest. (If you implement the ZMouseListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a node using the node's addMouseListener method. When a mouse button is pressed, released, or clicked (pressed and released), or when the mouse cursor enters or exits the node, the relevant method in the listener object is invoked and the ZMouseEvent is passed to it.

See Also:
ZMouseEvent, ZMouseListener

Constructor Summary
ZMouseAdapter()
           
 
Method Summary
 void mouseClicked(ZMouseEvent e)
          Invoked when the mouse has been clicked on a node.
 void mouseEntered(ZMouseEvent e)
          Invoked when the mouse enters a node.
 void mouseExited(ZMouseEvent e)
          Invoked when the mouse exits a node.
 void mousePressed(ZMouseEvent e)
          Invoked when a mouse button has been pressed on a node.
 void mouseReleased(ZMouseEvent e)
          Invoked when a mouse button has been released on a node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZMouseAdapter

public ZMouseAdapter()
Method Detail

mouseClicked

public void mouseClicked(ZMouseEvent e)
Invoked when the mouse has been clicked on a node.
Specified by:
mouseClicked in interface ZMouseListener

mousePressed

public void mousePressed(ZMouseEvent e)
Invoked when a mouse button has been pressed on a node.
Specified by:
mousePressed in interface ZMouseListener

mouseReleased

public void mouseReleased(ZMouseEvent e)
Invoked when a mouse button has been released on a node.
Specified by:
mouseReleased in interface ZMouseListener

mouseEntered

public void mouseEntered(ZMouseEvent e)
Invoked when the mouse enters a node.
Specified by:
mouseEntered in interface ZMouseListener

mouseExited

public void mouseExited(ZMouseEvent e)
Invoked when the mouse exits a node.
Specified by:
mouseExited in interface ZMouseListener


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