Package org.eclipse.swt.internal.dnd.gtk
Class ListDragSourceEffect
java.lang.Object
org.eclipse.swt.dnd.DragSourceAdapter
org.eclipse.swt.dnd.DragSourceEffect
org.eclipse.swt.internal.dnd.gtk.ListDragSourceEffect
- All Implemented Interfaces:
EventListener,DragSourceListener,SWTEventListener
This class provides default implementations to display a source image
when a drag is initiated from a
List.
Classes that wish to provide their own source image for a List can
extend the ListDragSourceEffect class, override the
ListDragSourceEffect.dragStart method and set the field
DragSourceEvent.image with their own image.
super method to get the default drag source effect implementation.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionListDragSourceEffect(List list) Creates a newListDragSourceEffectto handle drag effect from the specifiedList. -
Method Summary
Modifier and TypeMethodDescriptionvoiddragFinished(DragSourceEvent event) This implementation ofdragFinisheddisposes the image that was created inListDragSourceEffect.dragStart.voiddragStart(DragSourceEvent event) This implementation ofdragStartwill create a default image that will be used during the drag.Methods inherited from class org.eclipse.swt.dnd.DragSourceEffect
getControlMethods inherited from class org.eclipse.swt.dnd.DragSourceAdapter
dragSetData
-
Constructor Details
-
ListDragSourceEffect
Creates a newListDragSourceEffectto handle drag effect from the specifiedList.- Parameters:
list- theListthat the user clicks on to initiate the drag
-
-
Method Details
-
dragFinished
This implementation ofdragFinisheddisposes the image that was created inListDragSourceEffect.dragStart. Subclasses that override this method should callsuper.dragFinished(event)to dispose the image in the default implementation.- Specified by:
dragFinishedin interfaceDragSourceListener- Overrides:
dragFinishedin classDragSourceAdapter- Parameters:
event- the information associated with the drag finished event- See Also:
-
dragStart
This implementation ofdragStartwill create a default image that will be used during the drag. The image should be disposed when the drag is completed in theListDragSourceEffect.dragFinishedmethod. Subclasses that override this method should callsuper.dragStart(event)to use the image from the default implementation.- Specified by:
dragStartin interfaceDragSourceListener- Overrides:
dragStartin classDragSourceAdapter- Parameters:
event- the information associated with the drag start event- See Also:
-