Class DelegatingDropAdapter

java.lang.Object
org.eclipse.jface.util.DelegatingDropAdapter
org.eclipse.gef.dnd.DelegatingDropAdapter
All Implemented Interfaces:
EventListener, DropTargetListener

public class DelegatingDropAdapter extends DelegatingDropAdapter
A DropTargetListener that manages and delegates to a set of TransferDropTargetListeners. 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.