|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ZMouseListener is a listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a node. (To track mouse moves and mouse drags, use the ZMouseMotionListener.)
The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract ZMouseAdapter
class (overriding only the methods of interest).
The listener object created from that class is then registered with a node using the node's addMouseListener
method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a node. When a mouse event occurs, the relevant method in the listener object is invoked, and the MouseEvent
is passed to it.
ZMouseAdapter
, ZMouseEvent
Method Summary | |
void |
mouseClicked(ZMouseEvent e) Invoked when the mouse has been clicked on a component. |
void |
mouseEntered(ZMouseEvent e) Invoked when the mouse enters a component. |
void |
mouseExited(ZMouseEvent e) Invoked when the mouse exits a component. |
void |
mousePressed(ZMouseEvent e) Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(ZMouseEvent e) Invoked when a mouse button has been released on a component. |
Method Detail |
public void mouseClicked(ZMouseEvent e)
public void mousePressed(ZMouseEvent e)
public void mouseReleased(ZMouseEvent e)
public void mouseEntered(ZMouseEvent e)
public void mouseExited(ZMouseEvent e)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |