Package org.eclipse.swt.dnd
Class DropTargetAdapter
java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
- All Implemented Interfaces:
EventListener
,DropTargetListener
,SWTEventListener
- Direct Known Subclasses:
DropTargetEffect
,ViewerDropAdapter
This adapter class provides default implementations for the
methods described by the
DropTargetListener
interface.
Classes that wish to deal with DropTargetEvent
s 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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dragEnter
(DropTargetEvent event) This implementation ofdragEnter
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.void
dragLeave
(DropTargetEvent event) This implementation ofdragLeave
does nothing.void
This implementation ofdragOperationChanged
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.void
dragOver
(DropTargetEvent event) This implementation ofdragOver
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.void
drop
(DropTargetEvent event) This implementation ofdrop
does nothing.void
dropAccept
(DropTargetEvent event) This implementation ofdropAccept
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.
-
Constructor Details
-
DropTargetAdapter
public DropTargetAdapter()
-
-
Method Details
-
dragEnter
This implementation ofdragEnter
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dragEnter
.- Specified by:
dragEnter
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drag enter event- See Also:
-
dragLeave
This implementation ofdragLeave
does nothing. For additional information seeDropTargetListener.dragOperationChanged
.- Specified by:
dragLeave
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drag leave event- See Also:
-
dragOperationChanged
This implementation ofdragOperationChanged
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dragOperationChanged
.- Specified by:
dragOperationChanged
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drag operation changed event- See Also:
-
dragOver
This implementation ofdragOver
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dragOver
.- Specified by:
dragOver
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drag over event- See Also:
-
drop
This implementation ofdrop
does nothing. For additional information seeDropTargetListener.drop
.- Specified by:
drop
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drop event- See Also:
-
dropAccept
This implementation ofdropAccept
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dropAccept
.- Specified by:
dropAccept
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drop accept event- See Also:
-