Package com.ms.object.dragdrop
 In this topic

*Constructors

*Methods

 

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

 


Class DragProxy

public class DragProxy implements DragHandler
{
  // Constructors
  public DragProxy();
  public DragProxy(DragHandler handler);
  public DragProxy(DragHandler handler, int xOffset, int yOffset);

  // 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);
  public DragHandler getHandler();
  public Point getOffset();
  public void setHandler(DragHandler handler);
  public void setHandler(DragHandler handler, int xOffset,
        int yOffset);
  public void setOffset(Point offset);
  public void setOffset(int xOffset, int yOffset);
}

This class provides a DragHandler implementation that forwards calls to another specified DragHandler. Optionally, x and y offsets can be set and retrieved for a DragProxy object.

Constructors

DragProxy

public DragProxy();

Creates a new DragProxy object.

DragProxy

public DragProxy(DragHandler handler);

Creates a new DragProxy object that has the specified drag handler.

ParameterDescription
handler The drag handler to assign to the DragProxy instance.

DragProxy

public DragProxy(DragHandler handler, int xOffset, int yOffset);

Creates a new DragProxy object that has the specified drag handler, x offset, and y offset.

ParameterDescription
handler The drag handler for the DragProxy object.
xOffset The x offset for the DragProxy object.
yOffset The y offset for the DragProxy object.

Methods

dragEnter

public void dragEnter(DragSession session);

Notifies the recipient when a source object enters the space 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 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 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.

getHandler

public DragHandler getHandler();

Retrieves the drag handler for the DragProxy object.

Return Value:

Returns the drag handler for the DragProxy object.

getOffset

public Point getOffset();

Retrieves the offset for the DragProxy object.

Return Value:

Returns the Point object that represents the x offset and y offset of the DragProxy object.

setHandler

public void setHandler(DragHandler handler);

Sets the drag handler for the DragProxy object.

Return Value:

No return value.

ParameterDescription
handler The new handler for the DragProxy object.

setHandler

public void setHandler(DragHandler handler, int xOffset, int yOffset);

Sets the drag handler and the x and y offsets for the DragProxy object.

Return Value:

No return value.

ParameterDescription
handler The new handler for the DragProxy object.
xOffset The new x offset for the DragProxy object.
yoffset The new y offset for the DragProxy object.

setOffset

public void setOffset(Point offset);

Sets the x offset and y offset of the DragProxy object based on a specified Point object.

Return Value:

No return value.

ParameterDescription
offset The Point object that represents an x offset and y offset.

setOffset

public void setOffset(int xOffset, int yOffset);

Sets the x offset and y offset of the DragProxy object.

Return Value:

No return value.

ParameterDescription
xOffset The new value for the x offset.
yOffset The new value for the y offset.

upnrm.gif