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 ofDragSourceAdapterwhich 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,
CommonViewerconfigures 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 voiddragFinished(DragSourceEvent event)This implementation ofdragFinisheddoes nothing.voiddragSetData(DragSourceEvent event)This implementation ofdragSetDatadoes nothing.voiddragStart(DragSourceEvent event)This implementation ofdragStartpermits 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:DragSourceAdapterThis implementation ofdragStartpermits the drag operation to start. For additional information seeDragSourceListener.dragStart.- Specified by:
dragStartin interfaceDragSourceListener- Overrides:
dragStartin classDragSourceAdapter- Parameters:
event- the information associated with the drag start event- See Also:
DragSourceEvent
-
dragSetData
public void dragSetData(DragSourceEvent event)
Description copied from class:DragSourceAdapterThis implementation ofdragSetDatadoes nothing. For additional information seeDragSourceListener.dragSetData.- Specified by:
dragSetDatain interfaceDragSourceListener- Overrides:
dragSetDatain 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:DragSourceAdapterThis implementation ofdragFinisheddoes nothing. For additional information seeDragSourceListener.dragFinished.- Specified by:
dragFinishedin interfaceDragSourceListener- Overrides:
dragFinishedin classDragSourceAdapter- Parameters:
event- the information associated with the drag finished event- See Also:
DragSourceEvent
-
-