com.allen_sauer.gwt.dnd.demo.client.example.puzzle
Class SetWidgetDropController

java.lang.Object
  extended by com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
      extended by com.allen_sauer.gwt.dnd.client.drop.SimpleDropController
          extended by com.allen_sauer.gwt.dnd.demo.client.example.puzzle.SetWidgetDropController
All Implemented Interfaces:
DropController

public class SetWidgetDropController
extends SimpleDropController

DropController which allows a widget to be dropped on a SimplePanel drop target when the drop target does not yet have a child widget.


Constructor Summary
SetWidgetDropController(com.google.gwt.user.client.ui.SimplePanel dropTarget)
           
 
Method Summary
 void onDrop(DragContext context)
          Called when the draggable widget or its proxy is dropped on 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 com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
getDropTarget, onEnter, onLeave, onMove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetWidgetDropController

public SetWidgetDropController(com.google.gwt.user.client.ui.SimplePanel dropTarget)
Method Detail

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
Overrides:
onDrop in class AbstractDropController
Parameters:
context - the current drag context
See Also:
DropController.onPreviewDrop(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
Overrides:
onPreviewDrop in class AbstractDropController
Parameters:
context - the current drag context
Throws:
VetoDragException - if the proposed operation is unacceptable