public class DragSourceEffect extends DragSourceAdapter
The drag source effect has the same API as the
DragSourceAdapter
so that it can provide custom visual
feedback when a DragSourceEvent
occurs.
Classes that wish to provide their own drag source effect such as
displaying a default source image during a drag can extend the DragSourceEffect
class, override the DragSourceAdapter.dragStart
method and set
the field DragSourceEvent.image
with their own image.
The image should be disposed when DragSourceAdapter.dragFinished
is called.
DragSourceAdapter
,
DragSourceEvent
,
Sample code and further informationConstructor and Description |
---|
DragSourceEffect(Control control)
Creates a new
DragSourceEffect to handle drag effect from the specified Control . |
Modifier and Type | Method and Description |
---|---|
Control |
getControl()
Returns the Control which is registered for this DragSourceEffect.
|
dragFinished, dragSetData, dragStart
Control control
public DragSourceEffect(Control control)
DragSourceEffect
to handle drag effect from the specified Control
.control
- the Control
that the user clicks on to initiate the dragjava.lang.IllegalArgumentException
- public Control getControl()