Eclipse Platform
Release 3.3

org.eclipse.ui.navigator
Class CommonDragAdapter

java.lang.Object
  extended byorg.eclipse.swt.dnd.DragSourceAdapter
      extended byorg.eclipse.ui.navigator.CommonDragAdapter
All Implemented Interfaces:
DragSourceListener, EventListener, org.eclipse.swt.internal.SWTEventListener

public final class CommonDragAdapter
extends DragSourceAdapter

Provides an implementation of 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.

Since:
3.2
See Also:
INavigatorDnDService, CommonDragAdapterAssistant, CommonDropAdapter, CommonDropAdapterAssistant, CommonViewer

Constructor Summary
CommonDragAdapter(INavigatorContentService aContentService, ISelectionProvider aProvider)
          Create a DragAdapter that drives the configuration of the drag data.
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 with
aProvider - 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 the assistants.
See Also:
CommonDragAdapterAssistant, LocalSelectionTransfer, PluginTransfer

dragStart

public void dragStart(DragSourceEvent event)
Description copied from class: DragSourceAdapter
This implementation of dragStart permits the drag operation to start. For additional information see DragSourceListener.dragStart.

Specified by:
dragStart in interface DragSourceListener
Overrides:
dragStart in class DragSourceAdapter

dragSetData

public void dragSetData(DragSourceEvent event)
Description copied from class: DragSourceAdapter
This implementation of dragSetData does nothing. For additional information see DragSourceListener.dragSetData.

Specified by:
dragSetData in interface DragSourceListener
Overrides:
dragSetData in class DragSourceAdapter

dragFinished

public void dragFinished(DragSourceEvent event)
Description copied from class: DragSourceAdapter
This implementation of dragFinished does nothing. For additional information see DragSourceListener.dragFinished.

Specified by:
dragFinished in interface DragSourceListener
Overrides:
dragFinished in class DragSourceAdapter

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.