Top Description Fields Constructors Methods
org.eclipse.swt.dnd

public Class DragSourceEffect

extends DragSourceAdapter
Class Inheritance
Known Direct Subclasses
org.eclipse.swt.dnd.TableDragSourceEffect, org.eclipse.swt.dnd.TreeDragSourceEffect, org.eclipse.swt.internal.dnd.gtk.ListDragSourceEffect
Imports
org.eclipse.swt.*, org.eclipse.swt.widgets.*

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 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.

Since
3.3
See Also
DragSourceAdapter, DragSourceEvent, Sample code and further information

Field Summary

Modifier and TypeField and Description
pack-priv Control

Constructor Summary

AccessConstructor and Description
public
DragSourceEffect(Control
the Control that the user clicks on to initiate the drag
control
)

Creates a new DragSourceEffect to handle drag effect from the specified Control.

Method Summary

Modifier and TypeMethod and Description
public Control

Returns:

the Control which is registered for this DragSourceEffect
getControl
()

Returns the Control which is registered for this DragSourceEffect.

Inherited from org.eclipse.swt.dnd.DragSourceAdapter:
dragFinisheddragSetDatadragStart

Field Detail

controlback to summary
pack-priv Control control

Constructor Detail

DragSourceEffectback to summary
public DragSourceEffect(Control control)

Creates a new DragSourceEffect to handle drag effect from the specified Control.

Parameters
control:Control

the Control that the user clicks on to initiate the drag

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the control is null

Method Detail

getControlback to summary
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:Control

the Control which is registered for this DragSourceEffect