Package org.eclipse.ui.navigator
Class CommonDragAdapter
- java.lang.Object
-
- org.eclipse.swt.dnd.DragSourceAdapter
-
- org.eclipse.ui.navigator.CommonDragAdapter
-
- All Implemented Interfaces:
EventListener
,DragSourceListener
,SWTEventListener
public final class CommonDragAdapter extends DragSourceAdapter
Provides an implementation ofDragSourceAdapter
which uses the extensions provided by the associatedINavigatorContentService
.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.- Since:
- 3.2
- See Also:
INavigatorDnDService
,CommonDragAdapterAssistant
,CommonDropAdapter
,CommonDropAdapterAssistant
,CommonViewer
-
-
Constructor Summary
Constructors Constructor Description CommonDragAdapter(INavigatorContentService aContentService, ISelectionProvider aProvider)
Create a DragAdapter that drives the configuration of the drag data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dragFinished(DragSourceEvent event)
This implementation ofdragFinished
does nothing.void
dragSetData(DragSourceEvent event)
This implementation ofdragSetData
does nothing.void
dragStart(DragSourceEvent event)
This implementation ofdragStart
permits the drag operation to start.Transfer[]
getSupportedDragTransfers()
-
-
-
Constructor Detail
-
CommonDragAdapter
public CommonDragAdapter(INavigatorContentService aContentService, ISelectionProvider aProvider)
Create a DragAdapter that drives the configuration of the drag data.- Parameters:
aContentService
- The content service this Drag Adapter is associated withaProvider
- The provider that can give the current selection from the appropriate viewer.
-
-
Method Detail
-
getSupportedDragTransfers
public Transfer[] getSupportedDragTransfers()
- Returns:
- An array of supported Drag Transfer types. The list contains [
LocalSelectionTransfer.getTransfer()
,PluginTransfer.getInstance()
] in addition to any supported types contributed by theassistants
. - See Also:
CommonDragAdapterAssistant
,LocalSelectionTransfer
,PluginTransfer
-
dragStart
public void dragStart(DragSourceEvent event)
Description copied from class:DragSourceAdapter
This implementation ofdragStart
permits the drag operation to start. For additional information seeDragSourceListener.dragStart
.- Specified by:
dragStart
in interfaceDragSourceListener
- Overrides:
dragStart
in classDragSourceAdapter
- Parameters:
event
- the information associated with the drag start event- See Also:
DragSourceEvent
-
dragSetData
public void dragSetData(DragSourceEvent event)
Description copied from class:DragSourceAdapter
This implementation ofdragSetData
does nothing. For additional information seeDragSourceListener.dragSetData
.- Specified by:
dragSetData
in interfaceDragSourceListener
- Overrides:
dragSetData
in classDragSourceAdapter
- Parameters:
event
- the information associated with the drag set data event- See Also:
DragSourceEvent
-
dragFinished
public void dragFinished(DragSourceEvent event)
Description copied from class:DragSourceAdapter
This implementation ofdragFinished
does nothing. For additional information seeDragSourceListener.dragFinished
.- Specified by:
dragFinished
in interfaceDragSourceListener
- Overrides:
dragFinished
in classDragSourceAdapter
- Parameters:
event
- the information associated with the drag finished event- See Also:
DragSourceEvent
-
-