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

public Class ListDragSourceEffect

extends DragSourceEffect
Class Inheritance
Imports
org.eclipse.swt.*, org.eclipse.swt.dnd.*, org.eclipse.swt.graphics.*, org.eclipse.swt.internal.cairo.*, org.eclipse.swt.internal.gtk.*, org.eclipse.swt.widgets.*

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.

Subclasses that override any methods of this class must call the corresponding super method to get the default drag source effect implementation.
See Also
DragSourceEffect, DragSourceEvent, Sample code and further information

Field Summary

Modifier and TypeField and Description
private List
pack-priv Image

Constructor Summary

AccessConstructor and Description
public
ListDragSourceEffect(List
the List that the user clicks on to initiate the drag
list
)

Creates a new ListDragSourceEffect to handle drag effect from the specified List.

Method Summary

Modifier and TypeMethod and Description
public void
dragFinished(DragSourceEvent
the information associated with the drag finished event
event
)

Overrides org.eclipse.swt.dnd.DragSourceAdapter.dragFinished.

Implements org.eclipse.swt.dnd.DragSourceListener.dragFinished.

This implementation of dragFinished disposes the image that was created in ListDragSourceEffect.dragStart.
public void
dragStart(DragSourceEvent
the information associated with the drag start event
event
)

Overrides org.eclipse.swt.dnd.DragSourceAdapter.dragStart.

Implements org.eclipse.swt.dnd.DragSourceListener.dragStart.

This implementation of dragStart will create a default image that will be used during the drag.
pack-priv Image
Inherited from org.eclipse.swt.dnd.DragSourceEffect:
getControl

Field Detail

dragListback to summary
private List dragList
dragSourceImageback to summary
pack-priv Image dragSourceImage

Constructor Detail

ListDragSourceEffectback to summary
public ListDragSourceEffect(List list)

Creates a new ListDragSourceEffect to handle drag effect from the specified List.

Parameters
list:List

the List that the user clicks on to initiate the drag

Method Detail

dragFinishedback to summary
public void dragFinished(DragSourceEvent event)

Overrides org.eclipse.swt.dnd.DragSourceAdapter.dragFinished.

Implements org.eclipse.swt.dnd.DragSourceListener.dragFinished.

This implementation of dragFinished disposes the image that was created in ListDragSourceEffect.dragStart. Subclasses that override this method should call super.dragFinished(event) to dispose the image in the default implementation.

Parameters
event:DragSourceEvent

the information associated with the drag finished event

Annotations
@Override
dragStartback to summary
public void dragStart(DragSourceEvent event)

Overrides org.eclipse.swt.dnd.DragSourceAdapter.dragStart.

Implements org.eclipse.swt.dnd.DragSourceListener.dragStart.

This implementation of dragStart will create a default image that will be used during the drag. The image should be disposed when the drag is completed in the ListDragSourceEffect.dragFinished method. Subclasses that override this method should call super.dragStart(event) to use the image from the default implementation.

Parameters
event:DragSourceEvent

the information associated with the drag start event

Annotations
@Override
getDragSourceImageback to summary
pack-priv Image getDragSourceImage(DragSourceEvent event)