|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.
Constructor Summary | |
---|---|
ViewerDragAdapter(org.eclipse.jface.viewers.Viewer viewer)
This creates an instance for the given viewer. |
Method Summary | |
---|---|
void |
dragFinished(org.eclipse.swt.dnd.DragSourceEvent event)
This is called when dragging is completed; it forgets the selection . |
void |
dragSetData(org.eclipse.swt.dnd.DragSourceEvent event)
This is called to transfer the data. |
void |
dragStart(org.eclipse.swt.dnd.DragSourceEvent event)
This is called when dragging is initiated; it records the selection of viewer . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewerDragAdapter(org.eclipse.jface.viewers.Viewer viewer)
Method Detail |
---|
public void dragStart(org.eclipse.swt.dnd.DragSourceEvent event)
selection
of viewer
.
dragStart
in interface org.eclipse.swt.dnd.DragSourceListener
public void dragFinished(org.eclipse.swt.dnd.DragSourceEvent event)
selection
.
dragFinished
in interface org.eclipse.swt.dnd.DragSourceListener
public void dragSetData(org.eclipse.swt.dnd.DragSourceEvent event)
dragSetData
in interface org.eclipse.swt.dnd.DragSourceListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |