com.allen_sauer.gwt.dnd.client.drop
Interface DropController

All Known Implementing Classes:
AbsolutePositionDropController, AbstractDropController, AbstractIndexedDropController, AbstractInsertPanelDropController, AbstractPositioningDropController, AbstractSimplePanelDropController, BoundaryDropController, FlowPanelDropController, GridConstrainedDropController, HorizontalPanelDropController, IndexedDropController, SimpleDropController, SimplePanelDropController, SwtAbsoluteDropController, SwtCellPanelDropController, SwtFlowPanelDropController, SwtPreviewTreeItemDropController, SwtSimplePanelDropController, SwtTreeDropController, SwtTreeItemDropController, SwtTreeviewTreeItemDropController, VerticalPanelDropController

public interface DropController

Create a DropController for each drop target on which draggable widgets can be dropped. Do not forget to register each DropController with a DragController.


Method Summary
 com.google.gwt.user.client.ui.Widget getDropTarget()
          Retrieve our drop target widget.
 void onDrop(DragContext context)
          Called when the draggable widget or its proxy is dropped on our drop target.
 void onEnter(DragContext context)
          Called when the draggable widget or its proxy engages our drop target.
 void onLeave(DragContext context)
          Called when the reference widget stops engaging our drop target by leaving the area of the page occupied by our drop target, or after onDrop(DragContext) to allow for any cleanup.
 void onMove(DragContext context)
          Called with each mouse movement while the reference widget is engaging our drop target.
 void onPreviewDrop(DragContext context)
          Called just prior to onDrop(DragContext) to allow the drop operation to be cancelled by throwing a VetoDragException.
 

Method Detail

getDropTarget

com.google.gwt.user.client.ui.Widget getDropTarget()
Retrieve our drop target widget.

Returns:
the widget representing the drop target associated with this controller

onDrop

void onDrop(DragContext context)
Called when the draggable widget or its proxy is dropped on our drop target. Implementing classes must attach the draggable widget to our drop target in a suitable manner.

Parameters:
context - the current drag context
See Also:
onPreviewDrop(DragContext)

onEnter

void onEnter(DragContext context)
Called when the draggable widget or its proxy engages our drop target. This occurs when the widget area and the drop target area intersect and there are no drop targets which are descendants of our drop target which also intersect with the widget. If there are, the widget engages with the descendant drop target instead.

Parameters:
context - the current drag context
See Also:
onLeave(DragContext)

onLeave

void onLeave(DragContext context)
Called when the reference widget stops engaging our drop target by leaving the area of the page occupied by our drop target, or after onDrop(DragContext) to allow for any cleanup.

Parameters:
context - the current drag context
See Also:
onEnter(DragContext)

onMove

void onMove(DragContext context)
Called with each mouse movement while the reference widget is engaging our drop target. onEnter(DragContext) is called before this method is called.

Parameters:
context - the current drag context
See Also:
onEnter(DragContext), onLeave(DragContext)

onPreviewDrop

void onPreviewDrop(DragContext context)
                   throws VetoDragException
Called just prior to onDrop(DragContext) to allow the drop operation to be cancelled by throwing a VetoDragException.

Parameters:
context - the current drag context
Throws:
VetoDragException - if the proposed operation is unacceptable


Copyright © 2011 Sage Software, Inc. All rights reserved.