Top Description Constructors Methods
org.eclipse.swt.dnd

public Class DropTargetAdapter

extends Object
implements DropTargetListener
Class Inheritance
All Implemented Interfaces
org.eclipse.swt.dnd.DropTargetListener, org.eclipse.swt.internal.SWTEventListener, java.util.EventListener
Known Direct Subclasses
org.eclipse.swt.dnd.DropTargetEffect

This adapter class provides default implementations for the methods described by the DropTargetListener interface.

Classes that wish to deal with DropTargetEvents can extend this class and override only the methods which they are interested in.

Please note, there are subtle difference in DND behavior on different OS's. For example during a file transfer, Windows will put out the file path as soon as the drag begins, where as Linux will make it available only on a drop operation. For correct crossplatform behavior, it is recommended to delay OS interaction until drop has occurred or verify the correctness of the operation across platforms.

See Also
DropTargetListener, DropTargetEvent, Sample code and further information, Eclipse corner article on DND

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dragEnter(DropTargetEvent
the information associated with the drag enter event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.dragEnter.

This implementation of dragEnter permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType.
public void
dragLeave(DropTargetEvent
the information associated with the drag leave event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.dragLeave.

This implementation of dragLeave does nothing.
public void
dragOperationChanged(DropTargetEvent
the information associated with the drag operation changed event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.dragOperationChanged.

This implementation of dragOperationChanged permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType.
public void
dragOver(DropTargetEvent
the information associated with the drag over event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.dragOver.

This implementation of dragOver permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType.
public void
drop(DropTargetEvent
the information associated with the drop event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.drop.

This implementation of drop does nothing.
public void
dropAccept(DropTargetEvent
the information associated with the drop accept event
event
)

Implements org.eclipse.swt.dnd.DropTargetListener.dropAccept.

This implementation of dropAccept permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DropTargetAdapterback to summary
public DropTargetAdapter()

Method Detail

dragEnterback to summary
public void dragEnter(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.dragEnter.

This implementation of dragEnter permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType. For additional information see DropTargetListener.dragEnter.

Parameters
event:DropTargetEvent

the information associated with the drag enter event

Annotations
@Override
dragLeaveback to summary
public void dragLeave(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.dragLeave.

This implementation of dragLeave does nothing. For additional information see DropTargetListener.dragOperationChanged.

Parameters
event:DropTargetEvent

the information associated with the drag leave event

Annotations
@Override
dragOperationChangedback to summary
public void dragOperationChanged(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.dragOperationChanged.

This implementation of dragOperationChanged permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType. For additional information see DropTargetListener.dragOperationChanged.

Parameters
event:DropTargetEvent

the information associated with the drag operation changed event

Annotations
@Override
dragOverback to summary
public void dragOver(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.dragOver.

This implementation of dragOver permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType. For additional information see DropTargetListener.dragOver.

Parameters
event:DropTargetEvent

the information associated with the drag over event

Annotations
@Override
dropback to summary
public void drop(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.drop.

This implementation of drop does nothing. For additional information see DropTargetListener.drop.

Parameters
event:DropTargetEvent

the information associated with the drop event

Annotations
@Override
dropAcceptback to summary
public void dropAccept(DropTargetEvent event)

Implements org.eclipse.swt.dnd.DropTargetListener.dropAccept.

This implementation of dropAccept permits the default operation defined in event.detailto be performed on the current data type defined in event.currentDataType. For additional information see DropTargetListener.dropAccept.

Parameters
event:DropTargetEvent

the information associated with the drop accept event

Annotations
@Override