java::awt::event::MouseMotionAdapter Class Reference

Inheritance diagram for java::awt::event::MouseMotionAdapter:

Inheritance graph
java::awt::event::MouseMotionListenerjava::util::EventListenerjava::lang::Interfacejava::lang::Object
[legend]
Collaboration diagram for java::awt::event::MouseMotionAdapter:

Collaboration graph
java::awt::event::MouseMotionListenerjava::util::EventListenerjava::lang::Interfacejava::lang::Object
[legend]

List of all members.


Detailed Description

An abstract adapter class for receiving mouse motion events.

The methods in this class are empty. This class exists as convenience for creating listener objects.

Mouse motion events occur when a mouse is moved or dragged. (Many such events will be generated in a normal program. To track clicks and other mouse events, use the MouseAdapter.)

Extend this class to create a MouseEvent listener and override the methods for the events of interest. (If you implement the MouseMotionListener 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 component using the component's addMouseMotionListener method. When the mouse is moved or dragged, the relevant method in the listener object is invoked and the MouseEvent is passed to it.

Author:
Amy Fowler
Version:
1.14 01/23/03
See also:
MouseEvent

MouseMotionListener

Tutorial: Writing a Mouse Motion Listener

Reference: The Java Class Libraries (update file)

Since:
1.1

Public Member Functions

virtual void mouseDragged (const MouseEvent &e)
 Invoked when a mouse button is pressed on a component and then dragged.
virtual void mouseMoved (const MouseEvent &e)
 Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Member Function Documentation

virtual void java::awt::event::MouseMotionAdapter::mouseDragged ( const MouseEvent e  )  [virtual]

Invoked when a mouse button is pressed on a component and then dragged.

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.

Implements java::awt::event::MouseMotionListener.

virtual void java::awt::event::MouseMotionAdapter::mouseMoved ( const MouseEvent e  )  [virtual]

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Implements java::awt::event::MouseMotionListener.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:18 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3