Package org.eclipse.nebula.widgets.grid
Class GridDragSourceEffect
java.lang.Object
org.eclipse.swt.dnd.DragSourceAdapter
org.eclipse.swt.dnd.DragSourceEffect
org.eclipse.nebula.widgets.grid.GridDragSourceEffect
- All Implemented Interfaces:
java.util.EventListener,org.eclipse.swt.dnd.DragSourceListener,org.eclipse.swt.internal.SWTEventListener
public class GridDragSourceEffect
extends org.eclipse.swt.dnd.DragSourceEffect
This class provides default implementations to display a source image
when a drag is initiated from a
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.- Since:
- 3.3
- See Also:
DragSourceAdapter,DragSourceEvent
-
Field Summary
Fields Modifier and Type Field Description (package private) org.eclipse.swt.graphics.ImagedragSourceImage -
Constructor Summary
Constructors Constructor Description GridDragSourceEffect(Grid grid) -
Method Summary
Modifier and Type Method Description voiddragFinished(org.eclipse.swt.dnd.DragSourceEvent event)This implementation ofdragFinisheddisposes the image that was created inGridDragSourceEffect.dragStart.voiddragStart(org.eclipse.swt.dnd.DragSourceEvent event)This implementation ofdragStartwill create a default image that will be used during the drag.(package private) org.eclipse.swt.graphics.ImagegetDragSourceImage(org.eclipse.swt.dnd.DragSourceEvent event)
-
Field Details
-
dragSourceImage
org.eclipse.swt.graphics.Image dragSourceImage
-
-
Constructor Details
-
GridDragSourceEffect
- Parameters:
grid-
-
-
Method Details
-
dragFinished
public void dragFinished(org.eclipse.swt.dnd.DragSourceEvent event)This implementation ofdragFinisheddisposes the image that was created inGridDragSourceEffect.dragStart. Subclasses that override this method should callsuper.dragFinished(event)to dispose the image in the default implementation.- Specified by:
dragFinishedin interfaceorg.eclipse.swt.dnd.DragSourceListener- Overrides:
dragFinishedin classorg.eclipse.swt.dnd.DragSourceAdapter- Parameters:
event- the information associated with the drag finished event
-
dragStart
public void dragStart(org.eclipse.swt.dnd.DragSourceEvent event)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 theGridDragSourceEffect.dragFinishedmethod. Subclasses that override this method should callsuper.dragStart(event)to use the image from the default implementation.- Specified by:
dragStartin interfaceorg.eclipse.swt.dnd.DragSourceListener- Overrides:
dragStartin classorg.eclipse.swt.dnd.DragSourceAdapter- Parameters:
event- the information associated with the drag start event
-
getDragSourceImage
org.eclipse.swt.graphics.Image getDragSourceImage(org.eclipse.swt.dnd.DragSourceEvent event)
-