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
public class DropTargetAdapter extends Object implements DropTargetListener
This adapter class provides default implementations for the methods described by theDropTargetListener
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
Constructors Constructor Description DropTargetAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
dragOperationChanged(DropTargetEvent event)
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
.
-
-
-
Method Detail
-
dragEnter
public void dragEnter(DropTargetEvent event)
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:
DropTargetEvent
-
dragLeave
public void dragLeave(DropTargetEvent event)
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:
DropTargetEvent
-
dragOperationChanged
public void dragOperationChanged(DropTargetEvent event)
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:
DropTargetEvent
-
dragOver
public 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
. For additional information seeDropTargetListener.dragOver
.- Specified by:
dragOver
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drag over event- See Also:
DropTargetEvent
-
drop
public void drop(DropTargetEvent event)
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:
DropTargetEvent
-
dropAccept
public 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
. For additional information seeDropTargetListener.dropAccept
.- Specified by:
dropAccept
in interfaceDropTargetListener
- Parameters:
event
- the information associated with the drop accept event- See Also:
DropTargetEvent
-
-