|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.edit.ui.dnd.ViewerDragAdapter
public class ViewerDragAdapter
This is an implementation of DragSourceListener.
It allows the selection in effect at the start of the drag and drop interaction to be recorded,
which is especially important for a drag and drop interaction within a single view.
This is how one of these adapters is typically hooked up:
viewer.addDragSupport
(DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK,
new Transfer [] { LocalTransfer.getInstance() },
ViewerDragAdapter(viewer));
Doing so simply allows a drag operation to be initiated from the viewer
such that the viewer's selection is transferred to the drop target.
See EditingDomainViewerDropAdapter and LocalTransfer for more details.
| Field Summary | |
|---|---|
protected ISelection |
selection
This keeps track of the selection that is in effect at the start of the drag operation |
protected Viewer |
viewer
This keeps track of the viewer to which we are listening. |
| Constructor Summary | |
|---|---|
ViewerDragAdapter(Viewer viewer)
This creates an instance for the given viewer. |
|
| Method Summary | |
|---|---|
void |
dragFinished(DragSourceEvent event)
This is called when dragging is completed; it forgets the selection. |
void |
dragSetData(DragSourceEvent event)
This is called to transfer the data. |
void |
dragStart(DragSourceEvent event)
This is called when dragging is initiated; it records the selection of viewer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Viewer viewer
protected ISelection selection
| Constructor Detail |
|---|
public ViewerDragAdapter(Viewer viewer)
| Method Detail |
|---|
public void dragStart(DragSourceEvent event)
selection of viewer.
dragStart in interface DragSourceListenerpublic void dragFinished(DragSourceEvent event)
selection.
dragFinished in interface DragSourceListenerpublic void dragSetData(DragSourceEvent event)
dragSetData in interface DragSourceListener
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||