Package org.eclipse.net4j.util.ui.dnd

# Class DNDDropAdapter<TYPE>

java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
org.eclipse.jface.viewers.ViewerDropAdapter
org.eclipse.net4j.util.ui.dnd.DNDDropAdapter<TYPE>

All Implemented Interfaces:
  `EventListener`, `DropTargetListener`

public abstract class DNDDropAdapter<TYPE> extends ViewerDropAdapter

Author:
  Eike Stepper

## Field Summary

### Fields inherited from class org.eclipse.jface.viewers.ViewerDropAdapter

`LOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`DNDDropAdapter(StructuredViewer viewer)`
`protected`
`DNDDropAdapter(Transfer[] transfers, StructuredViewer viewer)`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`determineLocation(DropTargetEvent event)`
`Transfer[]`
`getTransfers()`
`StructuredViewer`
`getViewer()`
`boolean`
`isDropBetweenEnabled()`
`boolean`
`performDrop(Object data)`
`protected abstract boolean`
`performDrop(TYPE data, Object target)`
`void`
`setDropBetweenEnabled(boolean dropBetweenEnabled)`
`protected void`
`setTransfers(Transfer[] transfers)`
`boolean`
`validateDrop(Object target, int operation, TransferData type)`
`protected abstract boolean`
`validateTarget(Object target, int operation)`
`protected boolean`
`validateTransfer(TransferData type)`

### Methods inherited from class org.eclipse.jface.viewers.ViewerDropAdapter

`clearState, determineTarget, dragEnter, dragOperationChanged, dragOver, drop, dropAccept, getBounds, getCurrentEvent, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getThreshold, handleException, overrideOperation, setExpandEnabled, setFeedbackEnabled, setScrollEnabled, setScrollExpandEnabled, setSelectionFeedbackEnabled`

### Methods inherited from class org.eclipse.swt.dnd.DropTargetAdapter

`dragLeave`

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

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

## Constructor Details

### DNDDropAdapter

protected DNDDropAdapter(Transfer[] transfers, StructuredViewer viewer)

Since:
  3.0

### DNDDropAdapter

protected DNDDropAdapter(StructuredViewer viewer)

Since:
  3.3

## Method Details

### getTransfers

public Transfer[] getTransfers()

Since:
  3.0

### setTransfers

protected void setTransfers(Transfer[] transfers)

Since:
  3.3

### getViewer

public StructuredViewer getViewer()

Overrides:
  `getViewer` in class `ViewerDropAdapter`

### isDropBetweenEnabled

public boolean isDropBetweenEnabled()

### setDropBetweenEnabled

public void setDropBetweenEnabled(boolean dropBetweenEnabled)

### determineLocation

protected int determineLocation(DropTargetEvent event)

Overrides:
  `determineLocation` in class `ViewerDropAdapter`

### performDrop

public boolean performDrop(Object data)

Specified by:
  `performDrop` in class `ViewerDropAdapter`

### validateDrop

public boolean validateDrop(Object target, int operation, TransferData type)

Specified by:
  `validateDrop` in class `ViewerDropAdapter`

### validateTransfer

protected boolean validateTransfer(TransferData type)

Since:
  3.3

### validateTarget

protected abstract boolean validateTarget(Object target, int operation)

### performDrop

protected abstract boolean performDrop(TYPE data, Object target)