public class DragSourceEffect extends DragSourceAdapter
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.
DragSourceAdapter
,
DragSourceEvent
Constructor and Description |
---|
DragSourceEffect(Control control)
Creates a new
DragSourceEffect to handle drag effect from the specified Control . |
Modifier and Type | Method and Description |
---|---|
Control |
getControl()
Returns the Control which is registered for this DragSourceEffect.
|
dragFinished, dragSetData, dragStart
public DragSourceEffect(Control control)
DragSourceEffect
to handle drag effect from the specified Control
.control
- the Control
that the user clicks on to initiate the dragjava.lang.IllegalArgumentException
- public Control getControl()
Copyright (c) EclipseSource and others 2002, 2014.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0