Package org.eclipse.gef.dnd

# Class AbstractTransferDragSourceListener

java.lang.Object
org.eclipse.gef.dnd.AbstractTransferDragSourceListener

All Implemented Interfaces:
  `EventListener`, `TransferDragSourceListener`, `TransferDragSourceListener`, `DragSourceListener`

Direct Known Subclasses:
  `TemplateTransferDragSourceListener`

public abstract class AbstractTransferDragSourceListener extends Object implements TransferDragSourceListener, TransferDragSourceListener
An abstract implementation of `TransferDragSourceListener` associated with an `EditPartViewer`

## Constructor Summary

Constructors
Constructor
Description
`AbstractTransferDragSourceListener(EditPartViewer viewer)`
Constructs an AbstractTransferDragSourceListener for the given EditPartViewer.
`AbstractTransferDragSourceListener(EditPartViewer viewer, Transfer xfer)`
Constructs an AbstractTransferDragSourceListener with the specified EditPartViewer and Transfer.

## Method Summary

Modifier and Type
Method
Description
`void`
`dragFinished(DragSourceEvent event)`
`void`
`dragStart(DragSourceEvent event)`
`Transfer`
`getTransfer()`
`protected EditPartViewer`
`getViewer()`
Returns the `EditPartViewer`.
`protected void`
`setTransfer(Transfer xfer)`
Sets the `Transfer` for this listener.
`protected void`
`setViewer(EditPartViewer viewer)`
Sets the EditPartViewer for this listener.

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

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

### Methods inherited from interface org.eclipse.swt.dnd.DragSourceListener

`dragSetData`

## Constructor Details

### AbstractTransferDragSourceListener

public AbstractTransferDragSourceListener(EditPartViewer viewer)
Constructs an AbstractTransferDragSourceListener for the given EditPartViewer.

Parameters:
  `viewer` - the EditPartViewer

### AbstractTransferDragSourceListener

public AbstractTransferDragSourceListener(EditPartViewer viewer, Transfer xfer)
Constructs an AbstractTransferDragSourceListener with the specified EditPartViewer and Transfer.

Parameters:
  `viewer` - the EditPartViewer
  `xfer` - the Transfer

## Method Details

### dragFinished

public void dragFinished(DragSourceEvent event)

Specified by:
  `dragFinished` in interface `DragSourceListener`
See Also:
  - `DragSourceListener.dragFinished(DragSourceEvent)`

### dragStart

public void dragStart(DragSourceEvent event)

Specified by:
  `dragStart` in interface `DragSourceListener`
See Also:
  - `DragSourceListener.dragStart(DragSourceEvent)`

### getTransfer

public Transfer getTransfer()

Specified by:
  `getTransfer` in interface `TransferDragSourceListener`
See Also:
  - `TransferDragSourceListener.getTransfer()`

### getViewer

protected EditPartViewer getViewer()
Returns the `EditPartViewer`.

Returns:
  the EditPartViewer

### setTransfer

protected void setTransfer(Transfer xfer)
Sets the `Transfer` for this listener.

Parameters:
  `xfer` - the Transfer

### setViewer

protected void setViewer(EditPartViewer viewer)
Sets the EditPartViewer for this listener.

Parameters:
  `viewer` - the EditPartViewer