Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.swt.dnd
Interface DragSourceListener

All Superinterfaces:
EventListener, org.eclipse.swt.internal.SWTEventListener
All Known Subinterfaces:
TransferDragSourceListener
All Known Implementing Classes:
CommonDragAdapter, DelegatingDragAdapter, DragSourceAdapter, DragSourceEffect, NavigatorDragAdapter, TableDragSourceEffect, TreeDragSourceEffect

public interface DragSourceListener
extends org.eclipse.swt.internal.SWTEventListener

The DragSourceListener class provides event notification to the application for DragSource events.

When the user drops data on a DropTarget, the application which defines the DragSource must provide the dropped data by implementing dragSetData. In the dragSetData, the application must support all the data types that were specified in the DragSource#setTransfer method.

After the drop has completed successfully or has been aborted, the application which defines the DragSource is required to take the appropriate cleanup action. In the case of a successful move operation, the application must remove the data that was transferred.


Method Summary
 void dragFinished ( DragSourceEvent event)
          The drop has successfully completed(mouse up over a valid target) or has been terminated (such as hitting the ESC key).
 void dragSetData ( DragSourceEvent event)
          The data is required from the drag source.
 void dragStart ( DragSourceEvent event)
          The user has begun the actions required to drag the widget.
 

Method Detail

dragStart

void dragStart(
DragSourceEvent event)
The user has begun the actions required to drag the widget. This event gives the application the chance to decide if a drag should be started.

The following fields in the DragSourceEvent apply:

  • (in)widget
  • (in)time
  • (in,out)doit

Parameters:
event - the information associated with the drag start event
See Also:
DragSourceEvent

dragSetData

void dragSetData(
DragSourceEvent event)
The data is required from the drag source.

The following fields in the DragSourceEvent apply:

  • (in)widget
  • (in)time
  • (in)dataType - the type of data requested.
  • (out)data - the application inserts the actual data here (must match the dataType)
  • (out)doit - set this to cancel the drag

Parameters:
event - the information associated with the drag set data event
See Also:
DragSourceEvent

dragFinished

void dragFinished(
DragSourceEvent event)
The drop has successfully completed(mouse up over a valid target) or has been terminated (such as hitting the ESC key). Perform cleanup such as removing data from the source side on a successful move operation.

The following fields in the DragSourceEvent apply:

  • (in)widget
  • (in)time
  • (in)doit
  • (in)detail

Parameters:
event - the information associated with the drag finished event
See Also:
DragSourceEvent

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire