Package org.eclipse.swt.dnd
Class TableDragSourceEffect
java.lang.Object
org.eclipse.swt.dnd.DragSourceAdapter
org.eclipse.swt.dnd.DragSourceEffect
org.eclipse.swt.dnd.TableDragSourceEffect
- All Implemented Interfaces:
EventListener
,DragSourceListener
,SWTEventListener
This class provides default implementations to display a source image
when a drag is initiated from a
Table
.
Classes that wish to provide their own source image for a Table
can
extend the TableDragSourceEffect
class, override the
TableDragSourceEffect.dragStart
method and set the field
DragSourceEvent.image
with their own image.
super
method to get the default drag source effect implementation.- Since:
- 3.3
- See Also:
-
Constructor Summary
ConstructorDescriptionTableDragSourceEffect
(Table table) Creates a newTableDragSourceEffect
to handle drag effect from the specifiedTable
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dragFinished
(DragSourceEvent event) This implementation ofdragFinished
disposes the image that was created inTableDragSourceEffect.dragStart
.void
dragStart
(DragSourceEvent event) This implementation ofdragStart
will create a default image that will be used during the drag.Methods inherited from class org.eclipse.swt.dnd.DragSourceEffect
getControl
Methods inherited from class org.eclipse.swt.dnd.DragSourceAdapter
dragSetData
-
Constructor Details
-
TableDragSourceEffect
Creates a newTableDragSourceEffect
to handle drag effect from the specifiedTable
.- Parameters:
table
- theTable
that the user clicks on to initiate the drag
-
-
Method Details
-
dragFinished
This implementation ofdragFinished
disposes the image that was created inTableDragSourceEffect.dragStart
. Subclasses that override this method should callsuper.dragFinished(event)
to dispose the image in the default implementation.- Specified by:
dragFinished
in interfaceDragSourceListener
- Overrides:
dragFinished
in classDragSourceAdapter
- Parameters:
event
- the information associated with the drag finished event- See Also:
-
dragStart
This implementation ofdragStart
will create a default image that will be used during the drag. The image should be disposed when the drag is completed in theTableDragSourceEffect.dragFinished
method. Subclasses that override this method should callsuper.dragStart(event)
to use the image from the default implementation.- Specified by:
dragStart
in interfaceDragSourceListener
- Overrides:
dragStart
in classDragSourceAdapter
- Parameters:
event
- the information associated with the drag start event- See Also:
-