* cleanup after the drag and drop operation finishes
* @see org.eclipse.swt.dnd.DND
*/
public void addDragSupport(final int operations,
final Transfer[] transferTypes, final DragSourceListener listener) {
final DragSource dragSource = new DragSource(this, operations);
dragSource.setTransfer(transferTypes);
DragSourceListener wrapper = new DragSourceListener() {
@Override
public void dragStart(DragSourceEvent event) {
listener.dragStart(event);
}
@Override
public void dragSetData(DragSourceEvent event) {
listener.dragSetData(event);
}
@Override
public void dragFinished(DragSourceEvent event) {
listener.dragFinished(event);
// ensure to stop any current active internal drag mode
NatTable.this.modeSupport.switchMode(Mode.NORMAL_MODE);
}
};
dragSource.addDragListener(wrapper);
}