:: com :: sun :: star :: datatransfer :: dnd ::

interface XDragSource

Methods' Summary
isDragImageSupported In order to query if drag image support is available.  
getDefaultCursor To get the default cursor for a specified drag action.  
startDrag Starts the drag operation.  
Methods' Details
isDragImageSupported
boolean
isDragImageSupported();

Description
In order to query if drag image support is available.
Returns
A boolean indicating whether or not drag image support is available on the underlying platform.
getDefaultCursor
long
getDefaultCursor( [in] byte  dragAction )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
To get the default cursor for a specified drag action.
Parameter dragAction
A drag action as specified in DNDConstants.
Returns
The default drag cursor for the specified drag action.

The returned value may be used as parameter for the method XDragSourceContext::setCursor().

startDrag
void
startDrag( [in] DragGestureEvent  trigger,
[in] byte  sourceActions,
[in] long  cursor,
[in] long  image,
[in] ::com::sun::star::datatransfer::XTransferable  trans,
[in] XDragSourceListener  listener );

Description
Starts the drag operation.

Note: this call does not block until the drag and drop operation ends. If the Drag and Drop system is unable to initiate a drag operation or if the user attempts to start a drag while an existing drag operation is still executing, the action fails immediately. This is indicated by calling XDragSourceListener::dragDropEnd() on the parameter listener with a DragSourceDragEvent showing a failure.

Parameter trigger
The DragGestureEvent that initiated the drag.
Parameter sourceActions
The action or actions supported for this transferable as defined in DNDConstants.
Parameter cursor
The initial drag cursor id or 0 as default.
Parameter image
The initial drag image id or 0 as default.
Parameter trans
The transferable object dragged.
Parameter listener
The XDragSourceListener.
See also
::com::sun::star::datatransfer::XTransferable
Top of Page