com.allen_sauer.gwt.dnd.client
Class DragContext

java.lang.Object
  extended by com.allen_sauer.gwt.dnd.client.DragContext

public class DragContext
extends java.lang.Object

Container class for context information about the current drag operation.


Field Summary
 com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel
          The boundary panel for this drag controller.
 int desiredDraggableX
          Desired x coordinate of draggable due to mouse dragging.
 int desiredDraggableY
          Desired y coordinate of draggable due to mouse dragging.
 DragController dragController
          The DragController for which this context exists.
 com.google.gwt.user.client.ui.Widget draggable
          The primary widget currently being dragged or null when not dragging.
 DropController dropController
          The currently engaged drop controller or null when not dragging, or when the drag controller does not utilize drop controllers.
 DropController finalDropController
          The drop controller which participated in the final drop, or null before the final drop has occurred, or when the drag controller does not utilize drop controllers.
 int mouseX
          Current mouse x coordinate.
 int mouseY
          Current mouse y coordinate.
 java.util.List<com.google.gwt.user.client.ui.Widget> selectedWidgets
          List of currently selected widgets.
 java.lang.Exception vetoException
          At the end of a drag operation this fields will contain either the VetoDragException which caused the drag to be cancelled, or null if the drag was successful.
 
Method Summary
 void dragEndCleanup()
          Called by MouseDragHandler.dragEndCleanup() at the end of a drag operation to cleanup state.
 void dragStartCleanup()
          Called by MouseDragHandler.startDragging() at the start of a drag operation to initialize state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boundaryPanel

public final com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel
The boundary panel for this drag controller. TODO replace context.dragController.getBoundaryPanel() with context.boundaryPanel


desiredDraggableX

public int desiredDraggableX
Desired x coordinate of draggable due to mouse dragging.


desiredDraggableY

public int desiredDraggableY
Desired y coordinate of draggable due to mouse dragging.


dragController

public final DragController dragController
The DragController for which this context exists.


draggable

public com.google.gwt.user.client.ui.Widget draggable
The primary widget currently being dragged or null when not dragging.


dropController

public DropController dropController
The currently engaged drop controller or null when not dragging, or when the drag controller does not utilize drop controllers.


finalDropController

public DropController finalDropController
The drop controller which participated in the final drop, or null before the final drop has occurred, or when the drag controller does not utilize drop controllers. TODO use setter methods to handle the finalDropController/vetoException dependencies


mouseX

public int mouseX
Current mouse x coordinate.


mouseY

public int mouseY
Current mouse y coordinate.


selectedWidgets

public java.util.List<com.google.gwt.user.client.ui.Widget> selectedWidgets
List of currently selected widgets. List will contain at most one widget when DragController.setBehaviorMultipleSelection(boolean) is disabled.


vetoException

public java.lang.Exception vetoException
At the end of a drag operation this fields will contain either the VetoDragException which caused the drag to be cancelled, or null if the drag was successful. Note that while the value of this field will still be null in DragHandler.onPreviewDragEnd(DragEndEvent), the value will be available in DragHandler.onDragEnd(DragEndEvent).

Method Detail

dragEndCleanup

public void dragEndCleanup()
Called by MouseDragHandler.dragEndCleanup() at the end of a drag operation to cleanup state.


dragStartCleanup

public void dragStartCleanup()
Called by MouseDragHandler.startDragging() at the start of a drag operation to initialize state.



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