2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.navigation
.navigator
.e4
;
11 import org
.eclipse
.jface
.util
.LocalSelectionTransfer
;
12 import org
.eclipse
.jface
.viewers
.ISelection
;
13 import org
.eclipse
.jface
.viewers
.Viewer
;
14 import org
.eclipse
.swt
.dnd
.DragSourceAdapter
;
15 import org
.eclipse
.swt
.dnd
.DragSourceEvent
;
22 public class TreeNodeDragListenerE4
extends DragSourceAdapter
{
23 private Viewer viewer
;
25 public TreeNodeDragListenerE4(Viewer viewer
) {
29 public void setViewer(Viewer viewer
){
34 public void dragStart(DragSourceEvent event
) {
35 event
.doit
= true;// set to false if needed - default is true
40 public void dragSetData(DragSourceEvent event
) {
41 ISelection selection
= viewer
.getSelection();
42 LocalSelectionTransfer
.getTransfer().setSelection(selection
);