Runtime

## org.eclipse.gmf.runtime.common.ui.services.dnd.drop
Interface IDropTargetContext

All Known Implementing Classes:
  DropTargetContext

public interface IDropTargetContext

Interface that contains the context information relevant to the drop target.

Field Summary
`static int` `LOCATION_AFTER` Constant describing the position of the cursor relative to the target object.
`static int` `LOCATION_BEFORE` Constant describing the position of the cursor relative to the target object.
`static int` `LOCATION_NONE` Constant describing the position of the cursor relative to the target object.
`static int` `LOCATION_ON` Constant describing the position of the cursor relative to the target object.

Method Summary
`IWorkbenchPart` `getActivePart()` Returns the active `IWorkbenchPart` associated with the drop target viewer.
`Point` `getCurrentLocation()` Returns the coordinates of the current location of the mouse.
`java.lang.Object` `getCurrentTarget()` Returns the current target on the drop target viewer
`int` `getRelativeLocation()` Constant describing the position of the cursor relative to the target object
`Control` `getViewerControl()` Returns the control associated with the drop target viewer.

Field Detail

### LOCATION_BEFORE

    public static final int LOCATION_BEFORE

  Constant describing the position of the cursor relative to the target object. This means the mouse is positioned slightly before the target.

  See Also:
    `IDropTargetContext.getRelativeLocation()`, Constant Field Values

### LOCATION_AFTER

    public static final int LOCATION_AFTER

  Constant describing the position of the cursor relative to the target object. This means the mouse is positioned slightly after the target.

  See Also:
    `IDropTargetContext.getRelativeLocation()`, Constant Field Values

### LOCATION_ON

    public static final int LOCATION_ON

  Constant describing the position of the cursor relative to the target object. This means the mouse is positioned directly on the target.

  See Also:
    `IDropTargetContext.getRelativeLocation()`, Constant Field Values

### LOCATION_NONE

    public static final int LOCATION_NONE

  Constant describing the position of the cursor relative to the target object. This means the mouse is not positioned over or near any valid target.

  See Also:
    `IDropTargetContext.getRelativeLocation()`, Constant Field Values

Method Detail

### getViewerControl

    public Control getViewerControl()

  Returns the control associated with the drop target viewer.

  Returns:
    Control

### getActivePart

    public IWorkbenchPart getActivePart()

  Returns the active `IWorkbenchPart` associated with the drop target viewer.

  Returns:
    Returns the active `IWorkbenchPart`

### getCurrentTarget

    public java.lang.Object getCurrentTarget()

  Returns the current target on the drop target viewer

  Returns:
    Returns the current target on the drop target viewer

### getCurrentLocation

    public Point getCurrentLocation()

  Returns the coordinates of the current location of the mouse.

  Returns:
    Point the location

### getRelativeLocation

    public int getRelativeLocation()

  Constant describing the position of the cursor relative to the target object

  Returns:
    int the location

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.