DropTargetEffect

This class provides a default drag under effect during a drag and drop. The current implementation does not provide any visual feedback.

<p>The drop target effect has the same API as the <code>DropTargetAdapter</code> so that it can provide custom visual feedback when a <code>DropTargetEvent</code> occurs. </p>

<p>Classes that wish to provide their own drag under effect can extend the <code>DropTargetEffect</code> and override any applicable methods in <code>DropTargetAdapter</code> to display their own drag under effect.</p>

<p>The feedback value is either one of the FEEDBACK constants defined in class <code>DND</code> which is applicable to instances of this class, or it must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>DND</code> effect constants. </p> <p> <dl> <dt><b>Feedback:</b></dt> <dd>FEEDBACK_EXPAND, FEEDBACK_INSERT_AFTER, FEEDBACK_INSERT_BEFORE, FEEDBACK_NONE, FEEDBACK_SELECT, FEEDBACK_SCROLL</dd> </dl> </p>

@see DropTargetAdapter @see DropTargetEvent @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

@since 3.3

Constructors

this
this(Control control)

Creates a new <code>DropTargetEffect</code> to handle the drag under effect on the specified <code>Control</code>.

Members

Functions

getControl
Control getControl()

Returns the Control which is registered for this DropTargetEffect. This is the control over which the user positions the cursor to drop the data.

getItem
Widget getItem(int x, int y)

Returns the item at the given x-y coordinate in the receiver or null if no such item exists. The x-y coordinate is in the display relative coordinates.

Inherited Members

From DropTargetAdapter

dragEnter
void dragEnter(DropTargetEvent event)

This implementation of <code>dragEnter</code> permits the default operation defined in <code>event.detail</code>to be performed on the current data type defined in <code>event.currentDataType</code>. For additional information see <code>DropTargetListener.dragEnter</code>.

dragLeave
void dragLeave(DropTargetEvent event)

This implementation of <code>dragLeave</code> does nothing. For additional information see <code>DropTargetListener.dragOperationChanged</code>.

dragOperationChanged
void dragOperationChanged(DropTargetEvent event)

This implementation of <code>dragOperationChanged</code> permits the default operation defined in <code>event.detail</code>to be performed on the current data type defined in <code>event.currentDataType</code>. For additional information see <code>DropTargetListener.dragOperationChanged</code>.

dragOver
void dragOver(DropTargetEvent event)

This implementation of <code>dragOver</code> permits the default operation defined in <code>event.detail</code>to be performed on the current data type defined in <code>event.currentDataType</code>. For additional information see <code>DropTargetListener.dragOver</code>.

drop
void drop(DropTargetEvent event)

This implementation of <code>drop</code> does nothing. For additional information see <code>DropTargetListener.drop</code>.

dropAccept
void dropAccept(DropTargetEvent event)

This implementation of <code>dropAccept</code> permits the default operation defined in <code>event.detail</code>to be performed on the current data type defined in <code>event.currentDataType</code>. For additional information see <code>DropTargetListener.dropAccept</code>.

Meta