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

java.lang.Object
  extended by com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
      extended by com.allen_sauer.gwt.dnd.client.drop.AbstractPositioningDropController
          extended by com.allen_sauer.gwt.dnd.client.drop.AbsolutePositionDropController
              extended by com.allen_sauer.gwt.dnd.client.drop.BoundaryDropController
All Implemented Interfaces:
DropController

public class BoundaryDropController
extends AbsolutePositionDropController

A DropController for the Panel which contains a given draggable widget.


Field Summary
 
Fields inherited from class com.allen_sauer.gwt.dnd.client.drop.AbsolutePositionDropController
dropTargetClientHeight, dropTargetClientWidth, dropTargetOffsetX, dropTargetOffsetY
 
Constructor Summary
BoundaryDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget, boolean allowDroppingOnBoundaryPanel)
           
 
Method Summary
 boolean getBehaviorBoundaryPanelDrop()
          Whether or not dropping on the boundary panel is permitted.
 void onPreviewDrop(DragContext context)
          Called just prior to DropController.onDrop(DragContext) to allow the drop operation to be cancelled by throwing a VetoDragException.
 void setBehaviorBoundaryPanelDrop(boolean allowDroppingOnBoundaryPanel)
          Set whether or not widgets may be dropped anywhere on the boundary panel.
 
Methods inherited from class com.allen_sauer.gwt.dnd.client.drop.AbsolutePositionDropController
drop, getDraggableList, onDrop, onEnter, onLeave, onMove
 
Methods inherited from class com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
getDropTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundaryDropController

public BoundaryDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget,
                              boolean allowDroppingOnBoundaryPanel)
Method Detail

getBehaviorBoundaryPanelDrop

public boolean getBehaviorBoundaryPanelDrop()
Whether or not dropping on the boundary panel is permitted.

Returns:
true if dropping on the boundary panel is allowed

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

setBehaviorBoundaryPanelDrop

public void setBehaviorBoundaryPanelDrop(boolean allowDroppingOnBoundaryPanel)
Set whether or not widgets may be dropped anywhere on the boundary panel. Set to false when you only want explicitly registered drop controllers to accept drops. Defaults to true.

Parameters:
allowDroppingOnBoundaryPanel - true to allow dropping


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