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.DragSourceEffectThis class provides default implementations to display a source image when a drag is initiated from aGrid.Classes that wish to provide their own source image for a
Subclasses that override any methods of this class must call the correspondingGridcan extendDragSourceAdapterclass and override theDragSourceAdapter.dragStartmethod and set the fieldDragSourceEvent.imagewith their own image.supermethod 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
All Methods Instance Methods Concrete Methods 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)
-
-
-
Constructor Detail
-
GridDragSourceEffect
public GridDragSourceEffect(Grid grid)
- Parameters:
grid-
-
-
Method Detail
-
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)
-
-