O'Reilly logo

JavaBeans Unleashed by Rick Leinecker, Dr. Donald Doherty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The DragGestureListener

The DragGestureRecognizer associated with the GUI component recognizes a drag-and-drop action and sends a message to the registered DragGestureListener. The DragGestureListener then sends the DragSource a startDrag message to initiate the drag.

interface DragGestureListener
{
  public void dragGestureRecognized( DragGestureEvent e );
}

After the DragSource receives the startDrag message, it creates a DragSourceContext context object, which tracks the state of the operation by listening to a native DragSourceContextPeer. In a situation like this, the DragSource may be obtained from either the Event object or by an instance variable.

The DragSourceListener that will be informed during the drag-and-drop operation is specified ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required