Eclipse Platform
Release 3.3

org.eclipse.ui.views.navigator
Class NavigatorDragAdapter

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

public class NavigatorDragAdapter
extends DragSourceAdapter

Implements drag behaviour when items are dragged out of the resource navigator.

Since:
2.0

Constructor Summary
NavigatorDragAdapter(ISelectionProvider provider)
          Constructs a new drag adapter.
 
Method Summary
 void dragFinished(DragSourceEvent event)
          This implementation of DragSourceListener.dragFinished(DragSourceEvent) responds to a drag that has moved resources outside the Navigator by deleting the corresponding source resource.
 void dragSetData(DragSourceEvent event)
          This implementation of DragSourceListener.dragSetData(DragSourceEvent) sets the drag event data based on the current selection in the Navigator.
 void dragStart(DragSourceEvent event)
          This implementation of DragSourceListener.dragStart(DragSourceEvent) allows the drag to start if the current Navigator selection contains resources that can be dragged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigatorDragAdapter

public NavigatorDragAdapter(ISelectionProvider provider)
Constructs a new drag adapter.

Parameters:
provider - The selection provider
Method Detail

dragFinished

public void dragFinished(DragSourceEvent event)
This implementation of DragSourceListener.dragFinished(DragSourceEvent) responds to a drag that has moved resources outside the Navigator by deleting the corresponding source resource.

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

dragSetData

public void dragSetData(DragSourceEvent event)
This implementation of DragSourceListener.dragSetData(DragSourceEvent) sets the drag event data based on the current selection in the Navigator.

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

dragStart

public void dragStart(DragSourceEvent event)
This implementation of DragSourceListener.dragStart(DragSourceEvent) allows the drag to start if the current Navigator selection contains resources that can be dragged.

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

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

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