org.eclipse.gef.dnd

## Class DelegatingDropAdapter

- java.lang.Object
- - org.eclipse.jface.util.DelegatingDropAdapter
  - - org.eclipse.gef.dnd.DelegatingDropAdapter

All Implemented Interfaces:
  java.util.EventListener, DropTargetListener, SWTEventListener

    public class DelegatingDropAdapter
    extends DelegatingDropAdapter

A `DropTargetListener` that manages and delegates to a set of `TransferDropTargetListener`s. Each `TransferDropTargetListener` can then be implemented as if it were the DropTarget's only DropTargetListener.

On each DropTargetEvent, a current listener is obtained from the set of all TransferDropTargetListers. The current listener is the first listener to return `true` for `TransferDropTargetListener.isEnabled(DropTargetEvent)`. The current listener is forwarded all `DropTargetEvents` until some other listener becomes the current listener, or the Drop terminates.

As listeners are added and removed, the combined set of Transfers is updated to contain the `Tranfer` from each listener. `getTransferTypes()` provides the merged transfers. This set of Transfers should be set on the SWT `DropTarget`.

### Constructor Summary

Constructors
Constructor and Description
`DelegatingDropAdapter()`

### Method Summary

Methods
`void` `addDropTargetListener(TransferDropTargetListener listener)` Deprecated.
`Transfer[]` `getTransferTypes()` Deprecated. use getTransfers() instead
`void` `removeDropTargetListener(TransferDropTargetListener listener)` Removes the given `TransferDropTargetListener`.

### Methods inherited from class org.eclipse.jface.util.DelegatingDropAdapter

`addDropTargetListener, dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept, getTransfers, isEmpty, removeDropTargetListener`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DelegatingDropAdapter

    public DelegatingDropAdapter()

### Method Detail

#### addDropTargetListener

    public void addDropTargetListener(TransferDropTargetListener listener)

Deprecated.
Adds the given TransferDropTargetListener.

Parameters:
  `listener` - the listener

#### getTransferTypes

    public Transfer[] getTransferTypes()

Deprecated. use getTransfers() instead
Adds the Transfer from each listener to an array and returns that array.

Returns:
  the merged Transfers from all listeners

#### removeDropTargetListener

    public void removeDropTargetListener(TransferDropTargetListener listener)

Removes the given `TransferDropTargetListener`.

Parameters:
  `listener` - the listener