public final class CommonDragAdapter extends DragSourceAdapter
DragSourceAdapter
which uses the
extensions provided by the associated INavigatorContentService
.
Clients should not need to create an instance of this class unless they are
creating their own custom viewer. Otherwise, CommonViewer
configures
its drag adapter automatically.
INavigatorDnDService
,
CommonDragAdapterAssistant
,
CommonDropAdapter
,
CommonDropAdapterAssistant
,
CommonViewer
Constructor and Description |
---|
CommonDragAdapter(INavigatorContentService aContentService,
ISelectionProvider aProvider)
Create a DragAdapter that drives the configuration of the drag data.
|
Modifier and Type | Method and Description |
---|---|
void |
dragFinished(DragSourceEvent event)
This implementation of
dragFinished does nothing. |
void |
dragSetData(DragSourceEvent event)
This implementation of
dragSetData does nothing. |
void |
dragStart(DragSourceEvent event)
This implementation of
dragStart permits the drag operation to start. |
Transfer[] |
getSupportedDragTransfers() |
public CommonDragAdapter(INavigatorContentService aContentService, ISelectionProvider aProvider)
aContentService
- The content service this Drag Adapter is associated withaProvider
- The provider that can give the current selection from the
appropriate viewer.public Transfer[] getSupportedDragTransfers()
LocalSelectionTransfer.getTransfer()
,
PluginTransfer.getInstance()
] in addition to any
supported types contributed by the
assistants
.CommonDragAdapterAssistant
,
LocalSelectionTransfer
,
PluginTransfer
public void dragStart(DragSourceEvent event)
DragSourceAdapter
dragStart
permits the drag operation to start.
For additional information see DragSourceListener.dragStart
.dragStart
in interface DragSourceListener
dragStart
in class DragSourceAdapter
event
- the information associated with the drag start eventDragSourceEvent
public void dragSetData(DragSourceEvent event)
DragSourceAdapter
dragSetData
does nothing.
For additional information see DragSourceListener.dragSetData
.dragSetData
in interface DragSourceListener
dragSetData
in class DragSourceAdapter
event
- the information associated with the drag set data eventDragSourceEvent
public void dragFinished(DragSourceEvent event)
DragSourceAdapter
dragFinished
does nothing.
For additional information see DragSourceListener.dragFinished
.dragFinished
in interface DragSourceListener
dragFinished
in class DragSourceAdapter
event
- the information associated with the drag finished eventDragSourceEvent
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.