|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.event.ZMouseAdapter
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.
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 |
public ZMouseAdapter()
Method Detail |
public void mouseClicked(ZMouseEvent e)
mouseClicked
in interface ZMouseListener
public void mousePressed(ZMouseEvent e)
mousePressed
in interface ZMouseListener
public void mouseReleased(ZMouseEvent e)
mouseReleased
in interface ZMouseListener
public void mouseEntered(ZMouseEvent e)
mouseEntered
in interface ZMouseListener
public void mouseExited(ZMouseEvent e)
mouseExited
in interface ZMouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |