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

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.GridConstrainedDropController
All Implemented Interfaces:
DropController

public class GridConstrainedDropController
extends AbsolutePositionDropController

A DropController which constrains the placement of draggable widgets the grid specified in the constructor.


Field Summary
 
Fields inherited from class com.allen_sauer.gwt.dnd.client.drop.AbsolutePositionDropController
dropTargetClientHeight, dropTargetClientWidth, dropTargetOffsetX, dropTargetOffsetY
 
Constructor Summary
GridConstrainedDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget, int gridX, int gridY)
           
 
Method Summary
 void drop(com.google.gwt.user.client.ui.Widget widget, int left, int top)
          Programmatically drop a widget on our drop target while obeying the constraints of this controller.
 void onMove(DragContext context)
          Called with each mouse movement while the reference widget is engaging our drop target.
 
Methods inherited from class com.allen_sauer.gwt.dnd.client.drop.AbsolutePositionDropController
getDraggableList, onDrop, onEnter, onLeave
 
Methods inherited from class com.allen_sauer.gwt.dnd.client.drop.AbstractDropController
getDropTarget, onPreviewDrop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridConstrainedDropController

public GridConstrainedDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget,
                                     int gridX,
                                     int gridY)
Method Detail

drop

public void drop(com.google.gwt.user.client.ui.Widget widget,
                 int left,
                 int top)
Description copied from class: AbsolutePositionDropController
Programmatically drop a widget on our drop target while obeying the constraints of this controller.

Overrides:
drop in class AbsolutePositionDropController
Parameters:
widget - the widget to be dropped
left - the desired absolute horizontal location relative to our drop target
top - the desired absolute vertical location relative to our drop target

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
Overrides:
onMove in class AbsolutePositionDropController
Parameters:
context - the current drag context
See Also:
DropController.onEnter(DragContext), DropController.onLeave(DragContext)


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