Package org.eclipse.swt.dnd
Class TreeDragSourceEffect
java.lang.Object
org.eclipse.swt.dnd.DragSourceAdapter
org.eclipse.swt.dnd.DragSourceEffect
org.eclipse.swt.dnd.TreeDragSourceEffect
- All Implemented Interfaces:
- EventListener,- DragSourceListener
This class provides default implementations to display a source image
 when a drag is initiated from a 
Tree.
 Classes that wish to provide their own source image for a Tree can
 extend TreeDragSourceEffect class and override the TreeDragSourceEffect.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:
- 
Constructor SummaryConstructorsConstructorDescriptionTreeDragSourceEffect(Tree tree) Creates a newTreeDragSourceEffectto handle drag effect from the specifiedTree.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddragFinished(DragSourceEvent event) This implementation ofdragFinisheddisposes the image that was created inTreeDragSourceEffect.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.DragSourceEffectgetControlMethods inherited from class org.eclipse.swt.dnd.DragSourceAdapterdragSetData
- 
Constructor Details- 
TreeDragSourceEffectCreates a newTreeDragSourceEffectto handle drag effect from the specifiedTree.- Parameters:
- tree- the- Treethat the user clicks on to initiate the drag
 
 
- 
- 
Method Details- 
dragFinishedThis implementation ofdragFinisheddisposes the image that was created inTreeDragSourceEffect.dragStart. Subclasses that override this method should callsuper.dragFinished(event)to dispose the image in the default implementation.- Specified by:
- dragFinishedin interface- DragSourceListener
- Overrides:
- dragFinishedin class- DragSourceAdapter
- Parameters:
- event- the information associated with the drag finished event
- See Also:
 
- 
dragStartThis implementation ofdragStartwill create a default image that will be used during the drag. The image should be disposed when the drag is completed in theTreeDragSourceEffect.dragFinishedmethod. Subclasses that override this method should callsuper.dragStart(event)to use the image from the default implementation.- Specified by:
- dragStartin interface- DragSourceListener
- Overrides:
- dragStartin class- DragSourceAdapter
- Parameters:
- event- the information associated with the drag start event
- See Also:
 
 
-