Generated by
JDiff

java.awt.dnd Documentation Differences

This file contains all the changes in documentation in the package java.awt.dnd as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class 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.

In such situations it is desirable that the GUI control detect this and institute a scroll operation in order to make obscured region(s) visible to the user. This feature is known as autoscrolling.

If a GUI control is both an active DropTarget and is also scrollable it can receive notifications of autoscrolling gestures by the user from the DnD system by implementing this interface.

An autoscrolling gesture is initiated by the user by keeping the drag cursor motionless with a border region of the Component referred to as the "autoscrolling region" for a predefined period of time this will result in repeated scroll requests to the Component until the drag Cursor resumes its motion. @version 1.10 0211 12/0203/0001 @since 1.2


Class DnDConstants

This class contains constant values representing the type of action(s) to be performed by a Drag and Drop operation. @version 1.16 0217 12/0203/0001 @since 1.2

Class DragGestureEvent

A DragGestureEvent is passed to DragGestureListener's dragGestureRecognized() method when a particular DragGestureRecognizer detects that a platform dependent drag initiating gesture has occurred on the Component that it is tracking. @version 1.1520 @see java.awt.dnd.DragGestureRecognizer @see java.awt.dnd.DragGestureListener @see java.awt.dnd.DragSource
Class DragGestureEvent, Component getComponent()

ThisReturns method returns the Component associated with this DragGestureEvent.

@return the Component

Class DragGestureEvent, int getDragAction()

ThisReturns method returns an int representing the action selected by the user.

@return the action selected by the user

Class DragGestureEvent, Point getDragOrigin()

ThisReturns method returns a Point in the coordinates of the Component over which the drag originated.

@return the Point where the drag originated in Component coords.

Class DragGestureEvent, DragSource getDragSource()

ThisReturns method returns the DragSource.

@return the DragSource

Class DragGestureEvent, DragGestureRecognizer getSourceAsDragGestureRecognizer()

ThisReturns method returns the source as a DragGestureRecognizer.

@return the source as a DragGestureRecognizer

Class DragGestureEvent, InputEvent getTriggerEvent()

ThisReturns method returns the initial event that triggered the gesture.

@returnsreturn the first "triggering" event in the sequence of the gesture

Class DragGestureEvent, Iterator iterator()

ThisReturns method returns an Iterator for the events comprising the gesture.

@return an Iterator for the events comprising the gesture

Class DragGestureEvent, Object[] toArray()

ThisReturns method returns an Object array of the events comprising the drag gesture.

@return an array of the events comprising the gesture

Class DragGestureEvent, Object[] toArray(Object[])

ThisReturns method returns an array of the events comprising the drag gesture.

@param array the array of EventObject sub(types)

@return an array of the events comprising the gesture


Class DragGestureRecognizer

The DragGestureRecognizer is an abstract base class for the specification of a platform-dependent listener that can be associated with a particular Component in order to identify platform-dependent drag initiating gestures.

The appropriate DragGestureRecognizer subclass is obtained from the DragSource asssociated with a particular Component or from the Toolkit object via its createDragGestureRecognizer() method.

Once the DragGestureRecognizer is associated with a particular Component it will register the appropriate listener interfaces on that Component in order to track the input events delivered to the Component.

Once the DragGestureRecognizer identifies a sequence of events on the Component as a drag initiating gesture it will notify its unicast DragGestureListener by invoking its gestureRecognized() method.

When a concrete DragGestureRecognizer instance detects a drag initiating gesture on the Component it is associated with it will fire a DragGestureEvent to the DragGestureListener registered on its unicast event source for DragGestureListener events. This DragGestureListener is responsible for causing the associated DragSource to start the Drag and Drop operation (if appropriate).

@author Laurence P. G. Cable @version 1.1317 @see java.awt.dnd.DragGestureListener @see java.awt.dnd.DragGestureEvent @see java.awt.dnd.DragSource

Class DragGestureRecognizer, Component component

The Component associated with this DragGestureRecognizer. @serial
Class DragGestureRecognizer, DragSource dragSource

The DragSource associated with this DragGestureRecognizer. @serial
Class DragGestureRecognizer, ArrayList events

The list of events (in order) that the DragGestureRecognizer "recognized" as a "gesture" that triggers a drag. @serial
Class DragGestureRecognizer, int sourceActions

An int representing the type(s) of action(s) used in this Drag and Drop operation. @serial

Class DragSource

The DragSource is the entity responsible for the initiation of the Drag and Drop operation and may be used in a number of scenarios: Once the DragSource is obtained a DragGestureRecognizer should also be obtained to associate the DragSource with a particular Component.

The initial interpretation of the user's gesture and the subsequent starting of the drag operation are the responsibility of the implementing Component which is usually implemented by a DragGestureRecognizer.

When a drag gesture occurs the DragSource's startDrag() method shall be invoked in order to cause processing of the user's navigational gestures and delivery of Drag and Drop protocol notifications. A DragSource shall only permit a single Drag and Drop operation to be current at any one time and shall reject any further startDrag() requests by throwing an IllegalDnDOperationException until such time as the extant operation is complete.

The startDrag() method invokes the createDragSourceContext() method to instantiate an appropriate DragSourceContext and associate the DragSourceContextPeer with that.

If the Drag and Drop System is unable to initiate a drag operation for some reason the startDrag() method throws a java.awt.dnd.InvalidDnDOperationException to signal such a condition. Typically this exception is thrown when the underlying platform system is either not in a state to initiate a drag or the parameters specified are invalid.

Note that during the drag the set of operations exposed by the source at the start of the drag operation may not change until the operation is complete. The operation(s) are constant for the duration of the operation with respect to the DragSource. @version 1.30 0237 12/0203/0001 @since 1.2

Class DragSource, constructor DragSource()

Construct a new DragSource. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, DragSource getDefaultDragSource()

This method returns the DragSource object associated with the underlying platform. @return the platform DragSource @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultCopyDrop

The default Cursor to use with a copy operation indicating that a drop is currently allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultCopyNoDrop

The default Cursor to use with a copy operation indicating that a drop is currently not allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultLinkDrop

The default Cursor to use with a link operation indicating that a drop is currently allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultLinkNoDrop

The default Cursor to use with a link operation indicating that a drop is currently not allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultMoveDrop

The default Cursor to use with a move operation indicating that a drop is currently allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless
Class DragSource, Cursor DefaultMoveNoDrop

The default Cursor to use with a move operation indicating that a drop is currently not allowed. null if GraphicsEnvironment.isHeadless() returns true. @see java.awt.GraphicsEnvironment#isHeadless

Class DragSourceContext

The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol. In particular it is responsible for managing drag event notifications to the DragSourceListeners and providing the Transferable stateDragSourceMotionListeners to enableand providing the data transfer. An instance of this class is created as a result of a DragSource'sTransferable startDrag() method beingrepresenting successfully invoked. This instancethe is responsiblesource data for tracking the state of thedrag operation on behalf of the DragSource and dispatching state changes to the DragSourceListener.

Note that the DragSourceContext itself implements the DragSourceListener interfaceand DragSourceMotionListener interfaces. This is to allow the platform peer (the DragSourceContextPeer instance) created by the DragSource to notify the DragSourceContext of changes in state changes in the ongiongongoing operation. This allows the DragSourceContext to interpose itself between the platform and the DragSourceListenerlisteners provided by the initiator of the drag operation. @see DragSourceListener @see DragSourceMotionListener @version 1.42 0447 12/3003/01 @since 1.2

Class DragSourceContext, constructor DragSourceContext(DragSourceContextPeer, DragGestureEvent, Cursor, Image, Point, Transferable, DragSourceListener)

Called from DragSource this constructor creates a new DragSourceContext given the DragSourceContextPeer for this Drag the DragGestureEvent that triggered the Drag the initial Cursor to use for the Drag an (optional) Image to display while the Drag is taking place the offset of the Image origin from the hotspot at the instant of the triggering event the Transferable subject data and the DragSourceListener to use during the Drag and Drop operation.
If DragSourceContextPeer is null NullPointerException is thrown.
If DragGestureEvent is null NullPointerException is thrown.
If Cursor is null no exception is thrown and default drag cursors are used for this drag operation.
If Image is null no exception is thrown.
If Image is not null and the offset is null NullPointerException is thrown.
If Transferable is null NullPointerException is thrown.
If DragSourceListener is null no exception is thrown.
@param dscp the DragSourceContextPeer for this drag @param trigger the triggering event @param dragCursor the initial Cursor @param dragImage the Image to drag (or null) @param offset the offset of the image origin from the hotspot at the instant of the triggering event @param t the Transferable @param dsl the DragSourceListener @throws IllegalArgumentException if the Component associated with the trigger event is null. @throws IllegalArgumentException if the DragSource for the trigger event is null. @throws IllegalArgumentException if the drag action for the trigger instanceevent is incompleteDnDConstants.ACTION_NONE. @throws IllegalArgumentException if the source actions for the DragGestureRecognizer associated with the trigger event are equal to DnDConstants.ACTION_NONE. @throws NullPointerException if dscp dsl trigger or t are null or if dragImage is non-null and offset is null
Class DragSourceContext, void dragDropEnd(DragSourceDropEvent)

This method interceptscalls the DragSourceDropEvent associated with dragDropEnd() fromon the peer. Note: This method isDragSourceListeners called by theregistered with this peerDragSourceContext implementation notand with the user. The value ofassociated nullDragSource is notand acceptable aspasses them a parameter tothe thisspecified methodDragSourceDropEvent. @param dsde the intercepted DragSourceDropEvent
Class DragSourceContext, void dragEnter(DragSourceDragEvent)

This method interceptscalls dragEnter on the DragSourceDragEventDragSourceListeners associatedregistered with dragEnter() fromthis theDragSourceContext peer.and with Note:the Thisassociated methodDragSource is called byand passes them the peer implementation notspecified the userDragSourceDragEvent. @param dsde the intercepted DragSourceDragEvent
Class DragSourceContext, void dragExit(DragSourceEvent)

This method interceptscalls dragExit on the DragSourceEventDragSourceListeners associatedregistered with dragExit() fromthis theDragSourceContext peer.and with Note:the Thisassociated methodDragSource is called byand passes them the peer implementation notspecified the userDragSourceEvent. @param dsedsde the intercepted DragSourceEvent
Class DragSourceContext, void dragOver(DragSourceDragEvent)

This method interceptscalls dragOver on the DragSourceDragEventDragSourceListeners associatedregistered with dragOver() fromthis theDragSourceContext peer.and with Note:the Thisassociated methodDragSource is called byand passes them the peer implementation notspecified the userDragSourceDragEvent. @param dsde the intercepted DragSourceDragEvent
Class DragSourceContext, void dropActionChanged(DragSourceDragEvent)

This method interceptscalls dropActionChanged on the DragSourceDragEventDragSourceListeners associatedregistered with dropActionChanged() fromthis theDragSourceContext peer.and with Note:the Thisassociated methodDragSource is called byand passes them the peer implementation notspecified the userDragSourceDragEvent. @param dsde the intercepted DragSourceDragEvent
Class DragSourceContext, int getSourceActions()

This method returns ana bitwise mask of intDnDConstants representingthat represents the set of drop actions supported by the drag source for the currentdrag action(s)operation associated with this DragSourceContext. . @return the currentdrop actions supported by the drag source
Class DragSourceContext, Transferable getTransferable()

This method returns the Transferable associated with this DragSourceContext..

@return the Transferable


Class DragSourceDragEvent

The DragSourceDragEvent is delivered from the DragSourceContextPeer via the DragSourceContext to the currentlyDragSourceListener registered with that DragSourceListenerDragSourceContext and with its associated DragSource. It contains

The stateDragSourceDragEvent reports the target drop action and regardingthe user drop action that reflect the current state of the drag operation. to

Target drop action is one of DnDConstants that enablerepresents the operationsdrop initiatoraction toselected by the current drop target if this drop action is supported by the drag source or provideDnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

User drop action depends on the drop actions supported by the drag source and the drop action selected by the enduser. The user withcan select a drop action by pressing modifier keys during the drag operation:

 Ctrl + Shift -> ACTION_LINK Ctrl -> ACTION_COPY Shift -> ACTION_MOVE 
If the user selects a drop action the user drop action is one of DnDConstants that represents the selected drop action if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

If the user doesn't select a drop action the set of DnDConstants that represents the appropriateset of drop actions supported by the drag oversource is searched for DnDConstants.ACTION_MOVE then for DnDConstants.ACTION_COPY then for feedbackDnDConstants.ACTION_LINK and the user drop action is the first constant found. If no constant is found the user drop action is DnDConstants.ACTION_NONE. @version 1.20 0225 12/0203/0001 @since 1.2

Class DragSourceDragEvent, constructor DragSourceDragEvent(DragSourceContext, int, int, int)

Constructs a DragSourceDragEvent. This class is typically instantiated by the DragSourceContextPeer rather than directly by client code. The coordinates for this DragSourceDragEvent are not specified so getLocation will return null for this event. @param dsc the DragSourceContext that is to manage notifications for this event. @param dropAction the value of one of the staticuser fieldsdrop fromaction. DNDConstants@param indicatingactions the type of usertarget drop action this event represents. @param actionsmodifiers the valuemodifier of one of thekeys down during event static(shift fields fromctrl alt DNDConstantsmeta) indicating theEither extended type_DOWN_MASK of targetor old drop_MASK action supported by and returned from the current dropmodifiers should be used but both models should not target.be @parammixed modifiers specifiesin one theevent. stateUse of the input deviceextended modifiers associated withis thepreferred. user@see gesturejava.awt.event.InputEvent @see DragSourceEvent#getLocation
Class DragSourceDragEvent, int getDropAction()

This method returns anthe logical intintersection representingof the effectiveuser drop action which is the intersection of the user'starget selecteddrop action and the sourceset and targetof drop actions. supported @returnby the effective drop actiondrag whichsource. is@return the logical intersection of the user's drop action the target selecteddrop action and the sourceset and targetof drop actions supported by the drag source.
Class DragSourceDragEvent, int getTargetActions()

This method returns the logical intersection of the current target source anddrop user actionsaction. @return the logical intersection of the current target source anddrop user actionsaction.
Class DragSourceDragEvent, int getUserAction()

This method returns an int representing the user's currently selected drop action. @return the user's currently selected drop action.

Class DragSourceDropEvent

The DragSourceDropEvent is delivered from the DragSourceContextPeer via the DragSourceContext to itsthe currentlydragDropEnd registeredmethod of DragSourceListener's dragDropEnd()registered methodwith that DragSourceContext and with its associated DragSource. It contains sufficient information for the originator of the operation to provide appropriate feedback to the end user when the operation completes.

@version 1.12 0216 12/0203/0001

@since 1.2

Class DragSourceDropEvent, constructor DragSourceDropEvent(DragSourceContext)

Construct a DragSourceDropEvent for a drag that does not result in a drop. The coordinates for this DragSourceDropEvent are not specified so getLocation will return null for this event. @param dsc the DragSourceContext @see DragSourceEvent#getLocation
Class DragSourceDropEvent, constructor DragSourceDropEvent(DragSourceContext, int, boolean)

Construct a DragSourceDropEvent for a drop given the DragSourceContext the drop action and a boolean indicating if the drop was successful. The coordinates for this DragSourceDropEvent are not specified so getLocation will return null for this event. @param dsc the DragSourceContext associated with this DragSourceDropEvent @param action the drop action @param success a boolean indicating if the drop was successful @see DragSourceEvent#getLocation
Class DragSourceDropEvent, int getDropAction()

This method returns an int representing the action performed by the target on the subject of the drop. @return the action performed by the target on the subject of the drop if the drop target accepted the drop and the target drop action is supported by the drag source; otherwise DnDConstants.ACTION_NONE.
Class DragSourceDropEvent, boolean getDropSuccess()

This method returns a boolean indicating if the drop was a successsuccessful. @return true if the drop wastarget successfulaccepted the drop and successfully performed a drop action; false if the drop target rejected the drop or if the drop target accepted the drop but failed to perform a drop action.

Class DragSourceEvent

This class is the base class for DragSourceDragEvent and DragSourceDropEvent.

DragSourceEvents are generated whenever the drag enters moves over or exits a drop site when the drop action changes and when the drag ends. The location for the generated DragSourceEvent specifies the mouse cursor location in screen coordinates at the moment this event occured.

In a multi-screen environment without a virtual device the cursor location is specified in the coordinate system of the initiator GraphicsConfiguration. The initiator GraphicsConfiguration is the GraphicsConfiguration of the Component on which the drag gesture for the current drag operation was recognized. If the cursor location is outside the bounds of the initiator GraphicsConfiguration the reported coordinates are clipped to fit within the bounds of that GraphicsConfiguration.

In a multi-screen environment with a virtual device the location is specified in the corresponding virtual coordinate system. If the cursor location is outside the bounds of the virtual device the reported coordinates are clipped to fit within the bounds of the virtual device. @since 1.2

Class DragSourceEvent, constructor DragSourceEvent(DragSourceContext)

Construct a DragSourceEvent given a specified DragSourceContext. The coordinates for this DragSourceEvent are not specified so getLocation will return null for this event. @param dsc the DragSourceContext @see #getLocation

Class DragSourceListener

The DragSourceListener defines 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. @version 1.15 0217 12/0203/0001 @since 1.2
Class DragSourceListener, void dragDropEnd(DragSourceDropEvent)

This method is invoked to signify that the Drag and Drop operation is complete. The getDropSuccess() method of the DragSourceDropEvent can be used to determine the termination state. The getDropAction() method returns the operation that the DropTarget selected (via the DropTargetDropEventdrop acceptDrop()site parameter)selected to apply to the Drop operation. Once this method is complete the current DragSourceContext and associated resources become invalid. @param dsde the DragSourceDropEvent
Class DragSourceListener, void dragEnter(DragSourceDragEvent)

Called as the cursor's hotspot enters a platform -dependent drop site. This method is invoked when all the following conditions are true: @param dsde the DragSourceDragEvent
Class DragSourceListener, void dragExit(DragSourceEvent)

Called as the cursor's hotspot exits a platform -dependent drop site. This method is invoked when any of the following conditions are true: OR OR @param dse the DragSourceEvent
Class DragSourceListener, void dragOver(DragSourceDragEvent)

Called as the cursor's hotspot moves over a platform -dependent drop site. This method is invoked when all the following conditions are true: @param dsde the DragSourceDragEvent
Class DragSourceListener, void dropActionChanged(DragSourceDragEvent)

Called when the user has modified the drop gesture. This method is invoked when the state of the input device(s) that the user is interacting with changes. Such devices are typically the mouse buttons or keyboard modifiers that the user is interacting with. @param dsde the DragSourceDragEvent

Class DropTarget

The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations. @version 1.34 0241 12/0203/0001 @since 1.2
Class DropTarget, constructor DropTarget()

Construct a DropTarget. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless
Class DropTarget, constructor DropTarget(Component, DropTargetListener)

Construct a DropTarget given the Component to associate itself with and the DropTargetListener to handle event processing.

The Component will receive drops only if it is enabled. @param c The Component with which this DropTarget is associated @param dtl The DropTargetListener for this DropTarget @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless

Class DropTarget, constructor DropTarget(Component, int, DropTargetListener)

Construct a DropTarget given the Component to associate itself with an int representing the default acceptable action(s) to support and a DropTargetListener to handle event processing.

The Component will receive drops only if it is enabled. @param c The Component with which this DropTarget is associated @param ops The default acceptable actions for this DropTarget @param dtl The DropTargetListener for this DropTarget @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless

Class DropTarget, constructor DropTarget(Component, int, DropTargetListener, boolean)

Construct a DropTarget given the Component to associate itself with an int representing the default acceptable action(s) to support a DropTargetListener to handle event processing and a boolean indicating if the DropTarget is currently accepting drops.

The Component will receive drops only if it is enabled. @param c The Component with which this DropTarget is associated @param ops The default acceptable actions for this DropTarget @param dtl The DropTargetListener for this DropTarget @param act Is the DropTarget accepting drops. @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless

Class DropTarget, constructor DropTarget(Component, int, DropTargetListener, boolean, FlavorMap)

Construct a new DropTarget given the Component to associate itself with an int representing the default acceptable action(s) to support a DropTargetListener to handle event processing a boolean indicating if the DropTarget is currently accepting drops and a FlavorMap to use (or null).

The Component will receive drops only if it is enabled. @param c The Component with which this DropTarget is associated @param ops The default acceptable actions for this DropTarget @param dtl The DropTargetListener for this DropTarget @param act Is the DropTarget accepting drops. @param fm The FlavorMap to use or null @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true @see java.awt.GraphicsEnvironment#isHeadless


Class DropTargetContext

A DropTargetContext is created whenever the logical cursor associated with a Drag and Drop operation coincides with the visible geometry of a Component associated with a DropTarget. The DropTargetContext provides the mechanism for a potential receiver of a drop operation to both provide the end user with the appropriate drag under feedback but also to effect the subsequent data transfer if appropriate. @version 1.28 0233 12/0203/0001 @since 1.2

Class DropTargetContext.TransferableProxy

The TransferableProxy is a nested helper inner class that supportsimplements theTransferable interface and serves as a proxy for another DropTargetContextTransferable inobject managing thewhich represents data transfer offor dataa particular drag-n-drop operation. In particular it provides automatic support for

The proxy forwards all requests to the de-serializationencapsulated transferable and automatically performs additional conversion on the data returned by the encapsulated transferable in case of application/x-java-serialized-objectlocal DatFlavorstransfer.

Class DropTargetContext.TransferableProxy, Object getTransferData(DataFlavor)

getReturns an object which represents the transferdata provided by the encapsulated transferable for the requested data flavor. @param

dfIn case of local transfer a serialized copy of the DataFlavorobject returned @throwsby UnsupportedFlavorExceptionthe ifencapsulated transferable is provided when the data is requested DataFlavorin isapplication/x-java-serialized-object not supporteddata flavor. @param flavor the requested flavor for the data @throws IOException if the data is no longer available in the requested flavor. @returnthrows UnsupportedFlavorException if the Objectrequested data flavor is not supported.

Class DropTargetContext.TransferableProxy, DataFlavor[] getTransferDataFlavors()

getReturns an array of DataFlavor objects indicating the flavors the data can be provided in by the encapsulated transferable.

@return an array of data flavors in which the DataFlavordata arraycan be provided by the encapsulated transferable

Class DropTargetContext.TransferableProxy, boolean isDataFlavorSupported(DataFlavor)

checkReturns ifwhether or not the a particularspecified data flavor is supported by the encapsulated transferable. @param flavor the DataFlavorrequested flavor for the data @return a booleantrue indicating if the specifieddata DataFlavorflavor is supported. false otherwise
Class DropTargetContext.TransferableProxy, boolean isLocal

A boolean indicating if the encapsulated DragSourceTransferable isobject inrepresents the sameresult JVMof local drag-n-drop asoperation (within the DropTargetsame JVM).
Class DropTargetContext.TransferableProxy, Transferable transferable

The "actual"encapsulated Transferable that the Proxy is a Proxy for usually supplied from the underlying systemobject.

Class DropTargetContext, Transferable createTransferableProxy(Transferable, boolean)

subclasses may overrideCreates a TransferableProxy this to supply their own Proxyproxy for the specified Transferable . @param t the Transferable to be proxied @param local booleantrue if t represents the result of a local drag-n-drop operation. @return the Transferablenew TransferableProxy instance.

Class DropTargetDragEvent

The DropTargetDragEvent is delivered to a DropTargetListener via its dragEnter() and dragOver() methods.

The DropTargetDragEvent reports the source drop actions and the user drop action that reflect the current state of the drag operation.

Source drop actions is a bitwise mask of DnDConstants that represents the set of drop actions supported by the drag source for this drag operation.

User drop action depends on the drop actions supported by the drag source and the drop action selected by the user. The user can select a drop action by pressing modifier keys during the drag operation:

 Ctrl + Shift -> ACTION_LINK Ctrl -> ACTION_COPY Shift -> ACTION_MOVE 
If the user selects a drop action the user drop action is one of DnDConstants that represents the selected drop action if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

If the user doesn't select a drop action the set of DnDConstants that represents the set of drop actions supported by the drag source is searched for DnDConstants.ACTION_MOVE then for DnDConstants.ACTION_COPY then for DnDConstants.ACTION_LINK and the user drop action is the first constant found. If no constant is found the user drop action is DnDConstants.ACTION_NONE. @version 1.16 0220 12/0203/0001 @since 1.2

Class DropTargetDragEvent, constructor DropTargetDragEvent(DropTargetContext, Point, int, int)

Construct a DropTargetDragEvent given the DropTargetContext for this operation the location of the "Drag" Cursor's hotspot in the Component's coordinates the currently selected user drop action and current set ofthe source drop actions supported by the source.

@param dtc The DropTargetContext for this operation @param cursorLocn The location of the "Drag" Cursor's hotspot in Component coordinates @param dropAction The currently selected user drop action @param srcActions The current setsource ofdrop actions supported@throws by the sourceNullPointerException if cursorLocn is null @throws NullPointerExceptionIllegalArgumentException if cursorLocndropAction is nullnot one of DnDConstants. @throws IllegalArgumentException if the dropAction orsrcActions is not srcActionsa bitwise mask areof illegalDnDConstants. values@throws orIllegalArgumentException if dtc is null.

Class DropTargetDragEvent, void acceptDrag(int)

AcceptAccepts the drag. This method should be called from a DropTargetListeners dragEnter() dragOver() and dragActionChanged()dropActionChanged methods if the implementation wishes to accept an operation from the srcActions other than the one selected by the user as represented by the dropAction. @param dragOperation the operation accepted by the target
Class DropTargetDragEvent, int getDropAction()

This method returns an int representing the currentlyuser selected drop action. @return currently selectedthe user drop action
Class DropTargetDragEvent, int getSourceActions()

This method returns an int representingthe set ofsource drop actions supported by the source. @return the source drop actions
Class DropTargetDragEvent, void rejectDrag()

RejectRejects the drag as a result of examining either the dropAction or the available DataFlavor types.

Class DropTargetDropEvent

The DropTargetDropEvent is delivered via the DropTargetListener drop() method.

The DropTargetDropEvent reports the source drop actions and the user drop action that reflect the current state of the drag-and-drop operation.

Source drop actions is a bitwise mask of DnDConstants that represents the set of drop actions supported by the drag source for this drag-and-drop operation.

User drop action depends on the drop actions supported by the drag source and the drop action selected by the user. The user can select a drop action by pressing modifier keys during the drag operation:

 Ctrl + Shift -> ACTION_LINK Ctrl -> ACTION_COPY Shift -> ACTION_MOVE 
If the user selects a drop action the user drop action is one of DnDConstants that represents the selected drop action if this drop action is supported by the drag source or DnDConstants.ACTION_NONE if this drop action is not supported by the drag source.

If the user doesn't select a drop action the set of DnDConstants that represents the set of drop actions supported by the drag source is searched for DnDConstants.ACTION_MOVE then for DnDConstants.ACTION_COPY then for DnDConstants.ACTION_LINK and the user drop action is the first constant found. If no constant is found the user drop action is DnDConstants.ACTION_NONE. @version 1.21 0224 12/0203/0001 @since 1.2

Class DropTargetDropEvent, constructor DropTargetDropEvent(DropTargetContext, Point, int, int)

Construct a DropTargetDropEvent given the DropTargetContext for this operation the location of the drag Cursor's hotspot in the Component's coordinates the currently selected user drop action and the current set of actions supported by the source. By default this constructor assumes that the target is not in the same virtual machine as the source; that is #isLocalTransfer() will return false.

@param dtc The DropTargetContext for this operation @param cursorLocn The location of the "Drag" Cursor's hotspot in Component coordinates @param dropAction The currently selectedthe user drop action: COPY MOVE or LINK constants found in DnDConstants. @param srcActions The current set of actions supported by the source: some combination of COPY MOVEdrop oractions. LINK@throws asNullPointerException exposed by theif cursorLocn is DragSourcenull. @throws NullPointerExceptionIllegalArgumentException if cursorLocndropAction is not one of nullDnDConstants. @throws IllegalArgumentException if the dropAction orsrcActions is not srcActionsa bitwise mask areof illegalDnDConstants. values@throws orIllegalArgumentException if dtc is null.

Class DropTargetDropEvent, constructor DropTargetDropEvent(DropTargetContext, Point, int, int, boolean)

Construct a DropTargetEvent given the DropTargetContext for this operation the location of the drag Cursor's hotspot in the Component's coordinates the currently selected user drop action the current set of actions supported by the source and a boolean indicating if the source is in the same JVM as the target.

@param dtc The DropTargetContext for this operation @param cursorLocn The location of the "Drag" Cursor's hotspot in Component's coordinates @param dropAction The currently selectedthe user drop action: COPY MOVE. or@param LINK constants found in DnDConstantssrcActions the source drop actions. @param srcActionsisLocalTx The current set of actions supportedTrue if the source is in bythe same JVM as the source:target @throws NullPointerException some combination ofif cursorLocn is COPYnull MOVE@throws orIllegalArgumentException LINK as exposed byif dropAction is not theone of DragSourceDnDConstants. @param isLocalTxthrows TrueIllegalArgumentException if the sourcesrcActions is in the same JVM asnot a bitwise mask of theDnDConstants. target@throws IllegalArgumentException if dtc is null.

Class DropTargetDropEvent, int getDropAction()

This method returns an int representing the action(s) supported byuser thedrop sourceaction. at@return the time of theuser drop. @return source actions.
Class DropTargetDropEvent, int getSourceActions()

This method returns an int representing the action(s) supported bysource the sourcedrop actions. @return the source drop actions.

Class DropTargetEvent

The DropTargetEvent is the base class for both the DropTargetDragEvent and the DropTargetDropEvent. It encapsulates the current state of the Drag and Drop operations in particular the current DropTargetContext. @version 1.14 0216 12/0203/0001 @since 1.2
Class DropTargetEvent, DropTargetContext context

The DropTargetConextDropTargetContext associated with this DropTargetEvent. @serial

Class DropTargetListener

The DropTargetListener interface is the callback interface used by the DropTarget class to provide notification of DnD operations that involve the subject DropTarget. Methods of this interface may be implemented to provide "drag under" visual feedback to the user throughout the Drag and Drop operation.

Create a listener object by implementing the interface and then register it with a DropTarget. When the drag enters moves over or exits the operable part of the drop site for that DropTarget when the drop action changes and when the drop occurs the relevant method in the listener object is invoked and the DropTargetEvent is passed to it.

The operable part of the drop site for the DropTarget is the part of the associated Component's geometry that is not obscured by an overlapping top-level window or by another Component higher in the Z-order that has an associated active DropTarget. @version 1.16 0219 12/0203/0001 @since 1.2

Class DropTargetListener, void dragEnter(DropTargetDragEvent)

Called whenwhile a drag operation hasis ongoing when the mouse pointer enters the operable encounteredpart of the drop site for the DropTarget. registered with this listener. @param dtde the DropTargetDragEvent
Class DropTargetListener, void dragExit(DropTargetEvent)

TheCalled while a drag operation is ongoing when the mouse pointer has departedexited the operable part of the drop site for the DropTarget withoutregistered dropping.with this listener. @param dte the DropTargetEvent
Class DropTargetListener, void dragOver(DropTargetDragEvent)

Called when a drag operation is ongoing onwhile the mouse pointer is still over the operable part of the drop site for the DropTarget. registered with this listener. @param dtde the DropTargetDragEvent
Class DropTargetListener, void drop(DropTargetDropEvent)

TheCalled when the drag operation has terminated with a drop on thisthe operable part of the drop site for the DropTarget registered with this listener.

This method is responsible for undertaking the transfer of the data associated with the gesture. The DropTargetDropEvent provides a means to obtain a Transferable object that represents the data object(s) to be transfered.

From this method the DropTargetListener shall accept or reject the drop via the acceptDrop(int dropAction) or rejectDrop() methods of the DropTargetDropEvent parameter.

Subsequent to acceptDrop() but not before DropTargetDropEvent's getTransferable() method may be invoked and data transfer may be performed via the returned Transferable's getTransferData() method.

At the completion of a drop an implementation of this method is required to signal the success/failure of the drop by passing an appropriate boolean to the DropTargetDropEvent's dropComplete(boolean success) method.

Note: The actualdata transfer should be completed before the call to the DropTargetDropEvent's dropComplete(boolean success) method. After that a call to the getTransferData() processingmethod of the Transferable returned by DropTargetDropEvent.getTransferable() is guaranteed to succeed only if the data transfer is not requiredlocal; to finish before thisthat is only if methodDropTargetDropEvent.isLocalTransfer() returns true. It mayOtherwise the bebehavior of the deferred untilcall is laterimplementation-dependent.

@param dtde the DropTargetDropEvent


Class InvalidDnDOperationException

This exception is thrown by various methods in the java.awt.dnd package. It is usually thrown to indicate that the target in question is unable to undertake the requested operation that the present time since the undrelying DnD system is not in the appropriate state. @version 1.9 0210 12/0203/0001 @since 1.2

Class MouseDragGestureRecognizer

This abstract subclass of DragGestureRecognizer defines a DragGestureRecognizer for mouse based gestures. Each platform will implement its own concrete subclass of this class available via the Toolkit.createDragGestureRecognizer() method to encapsulate the recognition of the platform dependent mouse gesture(s) that initiate a Drag and Drop operation. @author Laurence P. G. Cable @version 1.911 @see java.awt.dnd.DragGestureListener @see java.awt.dnd.DragGestureEvent @see java.awt.dnd.DragSource