All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.swt.dnd.DragSourceEffect Maven / Gradle / Ivy

Go to download

The osx x86_64 swt jar as available in the Eclipse 4.6 (Neon) release for OSX. It is suitable for use with jface and other dependencies available from maven central in the org.eclipse.scout.sdk.deps group. The sources is copied from swt-4.6-cocoa-macosx-x86_64.zip from http://download.eclipse.org/eclipse/downloads/drops4/R-4.6-201606061100/ and javadoc is generated from sources.

The newest version!
/*******************************************************************************
 * Copyright (c) 2007, 2008 IBM Corporation and others.
 * 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:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.dnd;

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;

/**
 * This class provides default implementations to display a drag source
 * effect during a drag and drop operation. The current implementation
 * does not provide any visual feedback.
 *
 * 

The drag source effect has the same API as the * DragSourceAdapter so that it can provide custom visual * feedback when a DragSourceEvent occurs. *

* *

Classes that wish to provide their own drag source effect such as * displaying a default source image during a drag can extend the DragSourceEffect * class, override the DragSourceAdapter.dragStart method and set * the field DragSourceEvent.image with their own image. * The image should be disposed when DragSourceAdapter.dragFinished is called. *

* * @see DragSourceAdapter * @see DragSourceEvent * @see Sample code and further information * * @since 3.3 */ public class DragSourceEffect extends DragSourceAdapter { Control control = null; /** * Creates a new DragSourceEffect to handle drag effect from the specified Control. * * @param control the Control that the user clicks on to initiate the drag * * @exception IllegalArgumentException
    *
  • ERROR_NULL_ARGUMENT - if the control is null
  • *
*/ public DragSourceEffect(Control control) { if (control == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.control = control; } /** * Returns the Control which is registered for this DragSourceEffect. This is the control that the * user clicks in to initiate dragging. * * @return the Control which is registered for this DragSourceEffect */ public Control getControl() { return control; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy