4 package eu
.etaxonomy
.taxeditor
.editor
.name
.e4
.dnd
;
6 import org
.eclipse
.swt
.dnd
.DropTargetEffect
;
7 import org
.eclipse
.swt
.dnd
.DropTargetEvent
;
8 import org
.eclipse
.swt
.widgets
.Control
;
10 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
11 import eu
.etaxonomy
.taxeditor
.editor
.name
.e4
.IDropTargetableE4
;
12 import eu
.etaxonomy
.taxeditor
.preference
.Resources
;
19 public class NameEditorDropTargetEffect
extends DropTargetEffect
{
21 public NameEditorDropTargetEffect(Control control
) {
27 public void dragEnter(DropTargetEvent dropTargetEvent
) {
28 if(dropTargetEvent
.widget
instanceof IDropTargetableE4
){
29 ((IDropTargetableE4
) dropTargetEvent
.widget
).dragEntered();
35 public void dragLeave(DropTargetEvent dropTargetEvent
) {
36 if(dropTargetEvent
.widget
instanceof Control
){
37 ((Control
) dropTargetEvent
.widget
).setBackground(EditorUtil
.getColor(Resources
.COLOR_COMPOSITE_BACKGROUND
));