com.allen_sauer.gwt.dnd.client.drop
Class AbstractDropController

java.lang.Object
  extended by com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
All Implemented Interfaces:
DropController
Direct Known Subclasses:
AbstractPositioningDropController, SimpleDropController, SwtCellPanelDropController, SwtTreeDropController, SwtTreeItemDropController

public abstract class AbstractDropController
extends java.lang.Object
implements DropController

Base class for typical drop controllers. Contains some basic functionality like adjust widget styles.


Constructor Summary
AbstractDropController(com.google.gwt.user.client.ui.Widget dropTarget)
           
 
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 DropController.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 DropController.onDrop(DragContext) to allow the drop operation to be cancelled by throwing a VetoDragException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDropController

public AbstractDropController(com.google.gwt.user.client.ui.Widget dropTarget)
Method Detail

getDropTarget

public com.google.gwt.user.client.ui.Widget getDropTarget()
Description copied from interface: DropController
Retrieve our drop target widget.

Specified by:
getDropTarget in interface DropController
Returns:
the widget representing the drop target associated with this controller

onDrop

public void onDrop(DragContext context)
Description copied from interface: DropController
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.

Specified by:
onDrop in interface DropController
Parameters:
context - the current drag context
See Also:
DropController.onPreviewDrop(DragContext)

onEnter

public void onEnter(DragContext context)
Description copied from interface: DropController
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.

Specified by:
onEnter in interface DropController
Parameters:
context - the current drag context
See Also:
DropController.onLeave(DragContext)

onLeave

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

Specified by:
onLeave in interface DropController
Parameters:
context - the current drag context
See Also:
DropController.onEnter(DragContext)

onMove

public void onMove(DragContext context)
Description copied from interface: DropController
Called with each mouse movement while the reference widget is engaging our drop target. DropController.onEnter(DragContext) is called before this method is called.

Specified by:
onMove in interface DropController
Parameters:
context - the current drag context
See Also:
DropController.onEnter(DragContext), DropController.onLeave(DragContext)

onPreviewDrop

public void onPreviewDrop(DragContext context)
                   throws VetoDragException
Description copied from interface: DropController
Called just prior to DropController.onDrop(DragContext) to allow the drop operation to be cancelled by throwing a VetoDragException.

Specified by:
onPreviewDrop in interface DropController
Parameters:
context - the current drag context
Throws:
VetoDragException - if the proposed operation is unacceptable


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