Top Description Fields Constructors Methods
org.eclipse.swt.dnd

public Class DragSourceEvent

extends TypedEvent
Class Inheritance
Imports
org.eclipse.swt.events.*, org.eclipse.swt.graphics.*

The DragSourceEvent contains the event information passed in the methods of the DragSourceListener.
See Also
DragSourceListener, Sample code and further information

Field Summary

Modifier and TypeField and Description
public TransferData
dataType

The type of data requested.

public int
detail

The operation that was performed.

public boolean
doit

In dragStart, the doit field determines if the drag and drop operation should proceed; in dragFinished, the doit field indicates whether the operation was performed successfully.

public Image
image

The drag source image to be displayed during the drag.

public int
offsetX

In dragStart, the x offset (relative to the image) where the drag source image will be displayed.

public int
offsetY

In dragStart, the y offset (relative to the image) where the drag source image will be displayed.

pack-priv static final long
public int
x

In dragStart, the x coordinate (relative to the control) of the position the mouse went down to start the drag.

public int
y

In dragStart, the y coordinate (relative to the control) of the position the mouse went down to start the drag.

Inherited from org.eclipse.swt.events.TypedEvent:
datadisplaytimewidget

Constructor Summary

AccessConstructor and Description
public
DragSourceEvent(DNDEvent
the untyped event containing the information
e
)

Constructs a new instance of this class based on the information in the given untyped event.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string representation of the event
toString
()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.
pack-priv void

Field Detail

dataTypeback to summary
public TransferData dataType

The type of data requested. Data provided in the data field must be of the same type.

detailback to summary
public int detail

The operation that was performed.

See Also
DND#DROP_NONE, DND#DROP_MOVE, DND#DROP_COPY, DND#DROP_LINK, DND#DROP_TARGET_MOVE
doitback to summary
public boolean doit

In dragStart, the doit field determines if the drag and drop operation should proceed; in dragFinished, the doit field indicates whether the operation was performed successfully.

In dragStart:

Flag to determine if the drag and drop operation should proceed. The application can set this value to false to prevent the drag from starting. Set to true by default.

In dragSetData:

This will be set to true when the call to dragSetData is made. Set it to false to cancel the drag.

In dragFinished:

Flag to indicate if the operation was performed successfully. True if the operation was performed successfully.

imageback to summary
public Image image

The drag source image to be displayed during the drag.

A value of null indicates that no drag image will be displayed.

The default value is null.

Since
3.3
offsetXback to summary
public int offsetX

In dragStart, the x offset (relative to the image) where the drag source image will be displayed.

Since
3.5
offsetYback to summary
public int offsetY

In dragStart, the y offset (relative to the image) where the drag source image will be displayed.

Since
3.5
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.eclipse.swt.events.TypedEvent.serialVersionUID.

xback to summary
public int x

In dragStart, the x coordinate (relative to the control) of the position the mouse went down to start the drag.

Since
3.2
yback to summary
public int y

In dragStart, the y coordinate (relative to the control) of the position the mouse went down to start the drag.

Since
3.2

Constructor Detail

DragSourceEventback to summary
public DragSourceEvent(DNDEvent e)

Constructs a new instance of this class based on the information in the given untyped event.

Parameters
e:DNDEvent

the untyped event containing the information

Method Detail

toStringback to summary
public String toString()

Overrides org.eclipse.swt.events.TypedEvent.toString.

Returns a string containing a concise, human-readable description of the receiver.

Returns:String

a string representation of the event

Annotations
@Override
updateEventback to summary
pack-priv void updateEvent(DNDEvent e)