| 
 | JavaTM 2 Platform Standard Ed. 5.0 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
          Description
| Interface Summary | |
|---|---|
| Autoscroll | During DnD operations it is possible that a user may wish to drop the subject of the operation on a region of a scrollable GUI control that is not currently visible to the user. | 
| DragGestureListener | This interface is sourced from a DragGestureRecognizerand is invoked
 when an object of that (sub)class detects a drag initiating
 gesture. | 
| DragSourceListener | The DragSourceListenerdefines the 
 event interface for originators of
 Drag and Drop operations to track the state of the user's gesture, and to
 provide appropriate "drag over" 
 feedback to the user throughout the
 Drag and Drop operation. | 
| DragSourceMotionListener | A listener interface for receiving mouse motion events during a drag operation. | 
| DropTargetListener | The DropTargetListenerinterface 
 is the callback interface used by theDropTargetclass to provide 
 notification of DnD operations that involve
 the subjectDropTarget. | 
| Class Summary | |
|---|---|
| DnDConstants | This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation. | 
| DragGestureEvent | A DragGestureEventis passed 
 toDragGestureListener's  
 dragGestureRecognized() method
 when a particularDragGestureRecognizerdetects that a 
 platform dependent drag initiating gesture has occurred 
 on theComponentthat it is tracking. | 
| DragGestureRecognizer | The DragGestureRecognizeris an 
 abstract base class for the specification
 of a platform-dependent listener that can be associated with a particularComponentin order to 
 identify platform-dependent drag initiating gestures. | 
| DragSource | The DragSourceis the entity responsible 
 for the initiation of the Drag
 and Drop operation, and may be used in a number of scenarios: 
 
 1 default instance per JVM for the lifetime of that JVM. | 
| DragSourceAdapter | An abstract adapter class for receiving drag source events. | 
| DragSourceContext | The DragSourceContextclass is responsible for managing the
 initiator side of the Drag and Drop protocol. | 
| DragSourceDragEvent | The DragSourceDragEventis 
 delivered from theDragSourceContextPeer,
 via theDragSourceContext, to theDragSourceListenerregistered with thatDragSourceContextand with its associatedDragSource. | 
| DragSourceDropEvent | The DragSourceDropEventis delivered 
 from theDragSourceContextPeer,
 via theDragSourceContext, to thedragDropEndmethod ofDragSourceListeners registered with thatDragSourceContextand with its associatedDragSource. | 
| DragSourceEvent | This class is the base class for DragSourceDragEventandDragSourceDropEvent. | 
| DropTarget | The DropTargetis associated 
 with aComponentwhen thatComponentwishes
 to accept drops during Drag and Drop operations. | 
| DropTarget.DropTargetAutoScroller | this protected nested class implements autoscrolling | 
| DropTargetAdapter | An abstract adapter class for receiving drop target events. | 
| DropTargetContext | A DropTargetContextis created 
 whenever the logical cursor associated
 with a Drag and Drop operation coincides with the visible geometry of
 aComponentassociated with aDropTarget. | 
| DropTargetDragEvent | The DropTargetDragEventis delivered to aDropTargetListenervia its
 dragEnter() and dragOver() methods. | 
| DropTargetDropEvent | The DropTargetDropEventis delivered 
 via theDropTargetListenerdrop() method. | 
| DropTargetEvent | The DropTargetEventis the base 
 class for both theDropTargetDragEventand theDropTargetDropEvent. | 
| MouseDragGestureRecognizer | This abstract subclass of DragGestureRecognizerdefines aDragGestureRecognizerfor mouse-based gestures. | 
| Exception Summary | |
|---|---|
| InvalidDnDOperationException | This exception is thrown by various methods in the java.awt.dnd package. | 
Drag and Drop is a direct manipulation gesture found in many Graphical User Interface systems that provides a mechanism to transfer information between two entities logically associated with presentation elements in the GUI. Normally driven by a physical gesture of a human user using an appropriate input device, Drag and Drop provides both a mechanism to enable continuous feedback regarding the possible outcome of any subsequent data transfer to the user during navigation over the presentation elements in the GUI, and the facilities to provide for any subsequent data negotiation and transfer.
This package defines the classes and interfaces necessary to perform Drag and Drop operations in Java. It defines classes for the drag-source and the drop-target, as well as events for transferring the data being dragged. This package also provides a means for giving visual feedback to the user throughout the duration of the Drag and Drop operation.
A typical Drag and Drop operation can be decomposed into the following states (not entirely sequentially):
DragSource comes into existence, 
associated with some presentation
element (Component) in the GUI, to initiate a Drag and Drop of
some potentially Transferable data. 
DropTarget(s) come into/go out of 
existence, associated
with presentation elements in the GUI (Components), potentially
capable of consuming Transferable data types. 
DragGestureRecognizer is 
obtained from the DragSource and is
associated with a Component in order 
to track and identify any Drag
initiating gesture by the user over the Component. 
Component, 
which the registered
DragGestureRecognizer detects, and notifies its
DragGestureListener of. 
Note: Although this API consistently refers to the stimulus for a
drag and drop operation being a physical gesture by a human user, this
does not preclude a programmatically driven DnD operation given the
appropriate implementation of a DragSource. This package
contains the abstract class MouseDragGestureRecognizer for
recognizing mouse device gestures. Other abstract subclasses may be
provided by the platform to support other input devices or
particular Component class semantics. 
    
DragGestureListener causes the 
DragSource to initiate the Drag
and Drop operation on behalf of the user, perhaps animating the
GUI Cursor and/or rendering an Image of the item(s) that are the
subject of the operation.
Component(s) 
in the GUI with
associated DropTarget(s), the DragSource 
receives notifications in order
to provide "Drag Over" feedback effects, and the DropTarget(s)
receive notifications in order to provide "Drag Under" feedback effects
based upon the operation(s) supported and the data type(s) involved. 
The gesture itself moves a logical cursor across the GUI hierarchy,
intersecting the geometry of GUI Component(s), possibly resulting in
the logical "Drag" cursor entering, crossing, and subsequently
leaving Component(s) and associated DropTarget(s). 
The DragSource object manifests "Drag Over" feedback to the user, in the typical case by animating the GUI Cursor associated with the
logical cursor. 
DropTarget objects manifest "Drag Under" feedback to the user, in
the typical case, by rendering animations into their associated GUI
Component(s) under the GUI Cursor. 
The determination of the feedback effects, and the ultimate success or failure of the data transfer, should one occur, is parameterized as follows:
DragSource and DropTarget: Copy, Move or Reference(link). 
DragSource and the set of data types comprehensible by the 
DropTarget. 
DragSource and DropTarget
receive
notifications that include, and result in the type negotiation and
transfer of, the information associated with the DragSource via a
Transferable object. 
| 
 | JavaTM 2 Platform Standard Ed. 5.0 | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.