|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.dnd.DragSourceAdapter
org.eclipse.swt.dnd.DragSourceEffect
org.eclipse.swt.dnd.TreeDragSourceEffect
public class TreeDragSourceEffect
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.
DragSourceEffect,
DragSourceEvent,
Sample code and further information| Constructor Summary | |
|---|---|
TreeDragSourceEffect(Tree tree)
Creates a new TreeDragSourceEffect to handle drag effect
from the specified Tree. |
|
| Method Summary | |
|---|---|
void |
dragFinished(DragSourceEvent event)
This implementation of dragFinished disposes the image
that was created in TreeDragSourceEffect.dragStart. |
void |
dragStart(DragSourceEvent event)
This implementation of dragStart will create a default
image that will be used during the drag. |
| Methods inherited from class org.eclipse.swt.dnd.DragSourceEffect |
|---|
getControl |
| Methods inherited from class org.eclipse.swt.dnd.DragSourceAdapter |
|---|
dragSetData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeDragSourceEffect(Tree tree)
TreeDragSourceEffect to handle drag effect
from the specified Tree.
tree - the Tree that the user clicks on to initiate the drag| Method Detail |
|---|
public void dragFinished(DragSourceEvent event)
dragFinished disposes the image
that was created in TreeDragSourceEffect.dragStart.
Subclasses that override this method should call super.dragFinished(event)
to dispose the image in the default implementation.
dragFinished in interface DragSourceListenerdragFinished in class DragSourceAdapterevent - the information associated with the drag finished eventDragSourceEventpublic void dragStart(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 TreeDragSourceEffect.dragFinished
method.
Subclasses that override this method should call super.dragStart(event)
to use the image from the default implementation.
dragStart in interface DragSourceListenerdragStart in class DragSourceAdapterevent - the information associated with the drag start eventDragSourceEvent
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.