interface XDropTarget in module com::sun::star::datatransfer::dnd::

(Global Index)

Syntax

interface XDropTarget : com::sun::star::uno::XInterface ;

Description

This interface is implemented by a view or window that supports drop operations.

Differently to Java, the association between view and interface is fixed and cannot be changed. Otherwise, the AWT messaging would have to be implemented for any window supporting Drag and Drop operations, which would be a performance issue.

Method Summary

addDropTargetListener Add a DropTargetListener.

removeDropTargetListener Remove a drop target listener.

isActive Indicates either a drop target object is active or not.

setActive Sets the drop target object active or inactive.

getDefaultActions Determine the actions supported by a drop target.

setDefaultActions Sets the default acceptable actions for this drop target.

Known Services Which Export this Interface

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

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

Method Details



addDropTargetListener

Syntax

oneway void addDropTargetListener (
com::sun::star::datatransfer::dnd::XDropTargetListener dtl );

Description

Add a DropTargetListener.

The listener will be queried for the XAutoscroll interface to see if it supports autoscrolling.

Parameter dtl

The listener to add to the notification list.

removeDropTargetListener

Syntax

oneway void removeDropTargetListener (
com::sun::star::datatransfer::dnd::XDropTargetListener dtl );

Description

Remove a drop target listener.

Parameter dtl

The listener to remove from notification list.

isActive

Syntax

boolean isActive ();

Description

Indicates either a drop target object is active or not.

Returns

A boolean indicating whether or not this drop target object is currently active, that is ready to accept drops.

setActive

Syntax

void setActive (
boolean active );

Description

Sets the drop target object active or inactive.

Parameter active

A value of true sets the drop target object active.

A value of false sets the drop target object inactive.


getDefaultActions

Syntax

byte getDefaultActions ();

Description

Determine the actions supported by a drop target.

Returns

The current action or actions supported by this drop target.

By default this will include all drag and drop actions.

See also

DNDConstants

setDefaultActions

Syntax

oneway void setDefaultActions (
byte actions );

Description

Sets the default acceptable actions for this drop target.

This method is a way to reduce the number of Drag and Drop events by blocking events for actions not supported by this target.

By default the listener will receive notifications for all actions.

Parameter actions

The actions.

See also

DNDConstants
Top of Page