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

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
All Implemented Interfaces:
DropController
Direct Known Subclasses:
BoundaryDropController, GridConstrainedDropController, SwtAbsoluteDropController

public class AbsolutePositionDropController
extends AbstractPositioningDropController

A DropController which allows a draggable widget to be placed at specific (absolute) locations on an AbsolutePanel drop target.


Field Summary
protected  int dropTargetClientHeight
           
protected  int dropTargetClientWidth
           
protected  int dropTargetOffsetX
           
protected  int dropTargetOffsetY
           
 
Constructor Summary
AbsolutePositionDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget)
          Basic constructor.
 
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.
protected  java.util.List<Draggable> getDraggableList()
           
 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.
 
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
 

Field Detail

dropTargetClientHeight

protected int dropTargetClientHeight

dropTargetClientWidth

protected int dropTargetClientWidth

dropTargetOffsetX

protected int dropTargetOffsetX

dropTargetOffsetY

protected int dropTargetOffsetY
Constructor Detail

AbsolutePositionDropController

public AbsolutePositionDropController(com.google.gwt.user.client.ui.AbsolutePanel dropTarget)
Basic constructor.

Parameters:
dropTarget - the absolute panel drop target
Method Detail

getDraggableList

protected java.util.List<Draggable> getDraggableList()

drop

public 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.

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

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)

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


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