public class DropTargetEffect extends DropTargetAdapterThis class provides a default drag under effect during a drag and drop. The current implementation does not provide any visual feedback.
The drop target effect has the same API as the
DropTargetAdapterso that it can provide custom visual feedback when a
Classes that wish to provide their own drag under effect can extend the
DropTargetEffectand override any applicable methods in
DropTargetAdapterto display their own drag under effect.
The feedback value is either one of the FEEDBACK constants defined in class
DNDwhich is applicable to instances of this class, or it must be built by bitwise OR'ing together (that is, using the
int"|" operator) two or more of those
- FEEDBACK_EXPAND, FEEDBACK_INSERT_AFTER, FEEDBACK_INSERT_BEFORE, FEEDBACK_NONE, FEEDBACK_SELECT, FEEDBACK_SCROLL
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getControl()Returns the Control which is registered for this DropTargetEffect.
getItem(int x, int y)Returns the item at the given x-y coordinate in the receiver or null if no such item exists.
Methods inherited from class org.eclipse.swt.dnd.DropTargetAdapter
dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept
public DropTargetEffect(Control control)Creates a new
DropTargetEffectto handle the drag under effect on the specified
Controlover which the user positions the cursor to drop the data
- ERROR_NULL_ARGUMENT - if the control is null
public 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.
- the Control which is registered for this DropTargetEffect
public 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.
x- the x coordinate used to locate the item
y- the y coordinate used to locate the item
- the item at the given x-y coordinate, or null if the coordinate is not in a selectable item