Package com.ms.object.dragdrop
 In this topic

*Methods

 

Packages
  PreviousThis PackageNext
Package com.ms.object.dragdrop   Previous This
Package
Next

 


Interface DragHandler

public interface DragHandler
{
  // Methods
  public void dragEnter(DragSession session);
  public void dragLeave();
  public int dragOver(DragSession session, int x, int y);
  public void drop(DragSession session, int x, int y);
}

This interface defines methods that handle drag operations relative to other objects. A recipient would implement this interface to receive drops from a drag source. There are methods in this interface that notify the recipient when the object has entered, left, moved, or might have been dropped by the user.

To view an example that implements a DragHandler, see the com.ms.object.dragdrop overview.

Methods

dragEnter

public void dragEnter(DragSession session);

Notifies the recipient when a source object enters the space that is defined by a container, window, or object.

Return Value:

No return value.

ParameterDescription
session The DragSession object that represents the current drag operation.

dragLeave

public void dragLeave();

Notifies the recipient when a source object exits the space that is defined by a container, window, or object.

Return Value:

No return value.

dragOver

public int dragOver(DragSession session, int x, int y);

Notifies the recipient when a source object continues through the space that is defined by a container, window, or object.

Return Value:

Returns one or more of the following values:
NONE, COPY, MOVE, or LINK.

ParameterDescription
session The DragSession object that represents the current drag operation.
x The x coordinate of the current cursor position.
y The y coordinate of the current cursor position.

drop

public void drop(DragSession session, int x, int y);

Notifies the recipient when a source object is dropped at a new location.

Return Value:

No return value.

ParameterDescription
session The DragSession object that represents the current drag operation.
x The x coordinate of the current cursor position.
y The y coordinate of the current cursor position.

upnrm.gif