4 package eu
.etaxonomy
.taxeditor
.editor
.name
;
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
.IDropTargetable
;
12 import eu
.etaxonomy
.taxeditor
.preference
.Resources
;
15 * <p>NameEditorDropTargetEffect class.</p>
20 public class NameEditorDropTargetEffect
extends DropTargetEffect
{
23 * <p>Constructor for NameEditorDropTargetEffect.</p>
25 * @param control a {@link org.eclipse.swt.widgets.Control} object.
27 public NameEditorDropTargetEffect(Control control
) {
32 public void dragEnter(DropTargetEvent dropTargetEvent
) {
36 if(dropTargetEvent
.widget
instanceof IDropTargetable
){
37 ((IDropTargetable
) dropTargetEvent
.widget
).dragEntered();
40 // if(! EditorUtil.getActiveMultiPageTaxonEditor().equals(editor.getMultiPageTaxonEditor())){
41 // editor.getMultiPageTaxonEditor().setFocus();
46 public void dragLeave(DropTargetEvent dropTargetEvent
) {
50 if(dropTargetEvent
.widget
instanceof Control
){
51 ((Control
) dropTargetEvent
.widget
).setBackground(EditorUtil
.getColor(Resources
.COLOR_COMPOSITE_BACKGROUND
));