public abstract static class InputAdapter.Mouse
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener
Constructor and Description |
---|
Mouse() |
Modifier and Type | Method and Description |
---|---|
void |
listen(java.awt.Component c) |
void |
listen(java.awt.Component c,
boolean includeMouse,
boolean includeMotion,
boolean includeWheel) |
void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed
and released) on a component.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then
dragged.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse cursor has been moved onto a component
but no buttons have been pushed.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Invoked when the mouse wheel is rotated.
|
protected abstract void |
onMouseInput(InputAdapter.InputType type,
java.awt.event.MouseEvent e)
Override this to respond to mouse input.
|
void |
remove(java.awt.Component c) |
public void listen(java.awt.Component c)
public void listen(java.awt.Component c, boolean includeMouse, boolean includeMotion, boolean includeWheel)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- public void mouseDragged(java.awt.event.MouseEvent e)
MOUSE_DRAGGED
events will continue to be
delivered to the component where the drag originated until the
mouse button is released (regardless of whether the mouse position
is within the bounds of the component).
Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGED
events may not be delivered during a native
Drag&Drop operation.
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
e
- MouseWheelEvent
protected abstract void onMouseInput(InputAdapter.InputType type, java.awt.event.MouseEvent e)
type
- The type of mouse input (e.g. click, move, etc)e
- A MouseEvent with additional information about the event.public void remove(java.awt.Component c)