Package org.eclipse.swt.dnd
Class DragSourceEffect
- java.lang.Object
-
- org.eclipse.swt.dnd.DragSourceAdapter
-
- org.eclipse.swt.dnd.DragSourceEffect
-
- All Implemented Interfaces:
DragSourceListener
public class DragSourceEffect extends DragSourceAdapter
This class provides default implementations to display a drag source effect during a drag and drop operation. The current implementation does not provide any visual feedback.The drag source effect has the same API as the
DragSourceAdapterso that it can provide custom visual feedback when aDragSourceEventoccurs.Classes that wish to provide their own drag source effect such as displaying a default source image during a drag can extend the
DragSourceEffectclass, override theDragSourceAdapter.dragStartmethod and set the fieldDragSourceEvent.imagewith their own image. The image should be disposed whenDragSourceAdapter.dragFinishedis called.- Since:
- 1.3
- See Also:
DragSourceAdapter,DragSourceEvent
-
-
Constructor Summary
Constructors Constructor Description DragSourceEffect(Control control)Creates a newDragSourceEffectto handle drag effect from the specifiedControl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ControlgetControl()Returns the Control which is registered for this DragSourceEffect.-
Methods inherited from class org.eclipse.swt.dnd.DragSourceAdapter
dragFinished, dragSetData, dragStart
-
-
-
-
Constructor Detail
-
DragSourceEffect
public DragSourceEffect(Control control)
Creates a newDragSourceEffectto handle drag effect from the specifiedControl.- Parameters:
control- theControlthat the user clicks on to initiate the drag- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the control is null
-
-
Method Detail
-
getControl
public Control getControl()
Returns the Control which is registered for this DragSourceEffect. This is the control that the user clicks in to initiate dragging.- Returns:
- the Control which is registered for this DragSourceEffect
-
-