Eclipse Platform
Release 3.2

org.eclipse.ui.navigator
Interface ICommonDropAdapter


public interface ICommonDropAdapter

The common drop adapter provides a handle to useful information for ICommonDropActionDelegates. This interface is particularly unstable as of 3.2M4.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team.

Clients may implement this interface.

Since:
3.2

Method Summary
 int getCurrentLocation()
          Returns a constant describing the position of the mouse relative to the target (before, on, or after the target.
 int getCurrentOperation()
          Returns the current operation.
 Object getCurrentTarget()
          Returns the target object currently under the mouse.
 TransferData getCurrentTransfer()
          Return the current transfer data.
 boolean getFeedbackEnabled()
          Returns whether visible insertion feedback should be presented to the user.
 Object getSelectedObject()
          Returns the object currently selected by the viewer.
 Object getSelectedObject(TransferData transferType)
           
 Object getSelectedObject(TransferData transferType, Object data)
           
 

Method Detail

getSelectedObject

public Object getSelectedObject(TransferData transferType)
Parameters:
transferType -
Returns:
the selected object only if the transferType is of the type LocalSelectionTransfer.getInstance()

getSelectedObject

public Object getSelectedObject(TransferData transferType,
                                Object data)
Parameters:
transferType -
data - The data involved in the transfer.
Returns:
the selected object only if the transferType is of the type LocalSelectionTransfer.getInstance()

getCurrentLocation

public int getCurrentLocation()
Returns a constant describing the position of the mouse relative to the target (before, on, or after the target.

Returns:
one of the LOCATION_* constants defined in this type

getCurrentOperation

public int getCurrentOperation()
Returns the current operation.

Returns:
a DROP_* constant from class DND
See Also:
DND.DROP_COPY, DND.DROP_MOVE, DND.DROP_LINK, DND.DROP_NONE

getCurrentTarget

public Object getCurrentTarget()
Returns the target object currently under the mouse.

Returns:
the current target object

getSelectedObject

public Object getSelectedObject()
Returns the object currently selected by the viewer.

Returns:
the selected object, or null if either no object or multiple objects are selected

getCurrentTransfer

public TransferData getCurrentTransfer()
Return the current transfer data.

Returns:
The current transfer data for this drop.

getFeedbackEnabled

public boolean getFeedbackEnabled()
Returns whether visible insertion feedback should be presented to the user.

Typical insertion feedback is the horizontal insertion bars that appear between adjacent items while dragging.

Returns:
true if visual feedback is desired, and false if not
See Also:
ViewerDropAdapter.getFeedbackEnabled()

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.