public class GridDragSourceEffect
extends org.eclipse.swt.dnd.DragSourceEffect
Grid.
Classes that wish to provide their own source image for a Grid can
extend DragSourceAdapter class and override the DragSourceAdapter.dragStart
method and set the field DragSourceEvent.image with their own image.
super method to get the default drag under effect implementation.DragSourceAdapter,
DragSourceEvent| Modifier and Type | Field and Description |
|---|---|
(package private) org.eclipse.swt.graphics.Image |
dragSourceImage |
| Constructor and Description |
|---|
GridDragSourceEffect(Grid grid) |
| Modifier and Type | Method and Description |
|---|---|
void |
dragFinished(org.eclipse.swt.dnd.DragSourceEvent event)
This implementation of
dragFinished disposes the image
that was created in GridDragSourceEffect.dragStart. |
void |
dragStart(org.eclipse.swt.dnd.DragSourceEvent event)
This implementation of
dragStart will create a default
image that will be used during the drag. |
(package private) org.eclipse.swt.graphics.Image |
getDragSourceImage(org.eclipse.swt.dnd.DragSourceEvent event) |
public GridDragSourceEffect(Grid grid)
grid - public void dragFinished(org.eclipse.swt.dnd.DragSourceEvent event)
dragFinished disposes the image
that was created in GridDragSourceEffect.dragStart.
Subclasses that override this method should call super.dragFinished(event)
to dispose the image in the default implementation.dragFinished in interface org.eclipse.swt.dnd.DragSourceListenerdragFinished in class org.eclipse.swt.dnd.DragSourceAdapterevent - the information associated with the drag finished eventpublic void dragStart(org.eclipse.swt.dnd.DragSourceEvent event)
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 GridDragSourceEffect.dragFinished
method.
Subclasses that override this method should call super.dragStart(event)
to use the image from the default implementation.dragStart in interface org.eclipse.swt.dnd.DragSourceListenerdragStart in class org.eclipse.swt.dnd.DragSourceAdapterevent - the information associated with the drag start eventorg.eclipse.swt.graphics.Image getDragSourceImage(org.eclipse.swt.dnd.DragSourceEvent event)