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.
DropTargetListener, DropTargetEvent, Sample code and further information, Eclipse corner article on DND
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dragEnter(DropTargetEvent
the information associated with the drag enter event event)Implements org. 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. dragLeave does nothing.
|
| public void | dragOperationChanged(DropTargetEvent
the information associated with the drag operation changed event event)Implements org. 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. 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. drop does nothing.
|
| public void | dropAccept(DropTargetEvent
the information associated with the drop accept event event)Implements org. dropAccept permits the default
operation defined in event.detailto be performed on the current data type
defined in event.currentDataType.
|
| DropTargetAdapter | back to summary |
|---|---|
| public DropTargetAdapter() | |
| dragEnter | back to summary |
|---|---|
| public void dragEnter(DropTargetEvent event) Implements org. This implementation of
| |
| dragLeave | back to summary |
|---|---|
| public void dragLeave(DropTargetEvent event) Implements org. This implementation of
| |
| dragOperationChanged | back to summary |
|---|---|
| public void dragOperationChanged(DropTargetEvent event) Implements org. This implementation of
| |
| dragOver | back to summary |
|---|---|
| public void dragOver(DropTargetEvent event) Implements org. This implementation of
| |
| drop | back to summary |
|---|---|
| public void drop(DropTargetEvent event) Implements org. This implementation of
| |
| dropAccept | back to summary |
|---|---|
| public void dropAccept(DropTargetEvent event) Implements org. This implementation of
| |