public abstract class MouseAdapter extends Object implements MouseListener
Extend this class to create a MouseEvent listener and override
the methods for the events of interest. (If you implement the
MouseListener interface, you have to define all of the methods in
it. This abstract class defines null methods for them all, so
you only have to define methods for events you care about.)
Create a listener object using the extended class and then register it with a
browser using the browser's addMouseListener method. When a
mouse event occurs, the relevant method in the listener object is invoked and
the MouseEvent is passed to it.
| Constructor and Description |
|---|
MouseAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClick(MouseEvent e)
Invoked when a mouse button is clicked.
|
void |
onDoubleClick(MouseEvent e)
Invoked when a mouse button is double clicked.
|
void |
onMouseDown(MouseEvent e)
Invoked when a mouse button is pushed down.
|
void |
onMouseUp(MouseEvent e)
Invoked when a mouse button is released.
|
public void onDoubleClick(MouseEvent e)
MouseListeneronDoubleClick in interface MouseListenerpublic void onClick(MouseEvent e)
MouseListeneronClick in interface MouseListenerIOptionsService.setSuppressSecondClickEvent(boolean)public void onMouseDown(MouseEvent e)
MouseListeneronMouseDown in interface MouseListenerpublic void onMouseUp(MouseEvent e)
MouseListeneronMouseUp in interface MouseListener