X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fdnd%2FNoImageDragSourceEffect.java;h=650e8053d6e248d46bda36b5bd86da9c52df91fe;hb=e88be95edf1f80781646cfdf717ec1b663264179;hp=d402ef99297e6be49d1b6800e2861bbe2e4f6e17;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/dnd/NoImageDragSourceEffect.java b/bundles/org.simantics.ui/src/org/simantics/ui/dnd/NoImageDragSourceEffect.java index d402ef992..650e8053d 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/dnd/NoImageDragSourceEffect.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/dnd/NoImageDragSourceEffect.java @@ -1,36 +1,36 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.ui.dnd; - -import org.eclipse.swt.dnd.DragSourceEffect; -import org.eclipse.swt.dnd.DragSourceEvent; -import org.eclipse.swt.widgets.Control; - -/** - * An SWT {@link DragSourceEffect} implementation that prevents SWT DnD - * operations from showing screenshots of the dragged data. Useful when SWT is - * used with AWT which tends to cause unwanted visual effects during drags. - * - * @author Tuukka Lehtonen - */ -public class NoImageDragSourceEffect extends DragSourceEffect { - - public NoImageDragSourceEffect(Control control) { - super(control); - } - - @Override - public void dragStart(DragSourceEvent event) { - event.image = null; - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.ui.dnd; + +import org.eclipse.swt.dnd.DragSourceEffect; +import org.eclipse.swt.dnd.DragSourceEvent; +import org.eclipse.swt.widgets.Control; + +/** + * An SWT {@link DragSourceEffect} implementation that prevents SWT DnD + * operations from showing screenshots of the dragged data. Useful when SWT is + * used with AWT which tends to cause unwanted visual effects during drags. + * + * @author Tuukka Lehtonen + */ +public class NoImageDragSourceEffect extends DragSourceEffect { + + public NoImageDragSourceEffect(Control control) { + super(control); + } + + @Override + public void dragStart(DragSourceEvent event) { + event.image = null; + } + +}