DropTarget.addDropListener

Adds the listener to the collection of listeners who will be notified when a drag and drop operation is in progress, by sending it one of the messages defined in the <code>DropTargetListener</code> interface.

<p><ul> <li><code>dragEnter</code> is called when the cursor has entered the drop target boundaries <li><code>dragLeave</code> is called when the cursor has left the drop target boundaries and just before the drop occurs or is cancelled. <li><code>dragOperationChanged</code> is called when the operation being performed has changed (usually due to the user changing the selected modifier key(s) while dragging) <li><code>dragOver</code> is called when the cursor is moving over the drop target <li><code>dropAccept</code> is called just before the drop is performed. The drop target is given the chance to change the nature of the drop or veto the drop by setting the <code>event.detail</code> field <li><code>drop</code> is called when the data is being dropped </ul></p>

@param listener the listener which should be notified

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if the listener is null</li> </ul> @exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

@see DropTargetListener @see #getDropListeners @see #removeDropListener @see DropTargetEvent

class DropTarget
void
addDropListener

Meta