public class GridConstrainedDropController extends AbsolutePositionDropController
DropController
which constrains the placement of draggable widgets the grid specified
in the constructor.Constructor and Description |
---|
GridConstrainedDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget,
int gridX,
int gridY) |
Modifier and Type | Method and Description |
---|---|
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.
|
onDrop, onEnter, onLeave
getDropTarget, onPreviewDrop
public GridConstrainedDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget, int gridX, int gridY)
public void drop(com.google.gwt.user.client.ui.Widget widget, int left, int top)
AbsolutePositionDropController
drop
in class AbsolutePositionDropController
widget
- the widget to be droppedleft
- the desired absolute horizontal location relative to our drop targettop
- the desired absolute vertical location relative to our drop targetpublic void onMove(DragContext context)
DropController
DropController.onEnter(DragContext)
is called before this method is called.onMove
in interface DropController
onMove
in class AbsolutePositionDropController
context
- the current drag contextDropController.onEnter(DragContext)
,
DropController.onLeave(DragContext)