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)
MouseListener
onDoubleClick
in interface MouseListener
public void onClick(MouseEvent e)
MouseListener
onClick
in interface MouseListener
IOptionsService.setSuppressSecondClickEvent(boolean)
public void onMouseDown(MouseEvent e)
MouseListener
onMouseDown
in interface MouseListener
public void onMouseUp(MouseEvent e)
MouseListener
onMouseUp
in interface MouseListener