public class DragContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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. |
Modifier and Type | Method and Description |
---|---|
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. |
public final com.google.gwt.user.client.ui.AbsolutePanel boundaryPanel
public int desiredDraggableX
public int desiredDraggableY
public final DragController dragController
public com.google.gwt.user.client.ui.Widget draggable
null
when not dragging.public DropController dropController
null
when not dragging, or when the drag
controller does not utilize drop controllers.public DropController finalDropController
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 dependenciespublic int mouseX
public int mouseY
public java.util.List<com.google.gwt.user.client.ui.Widget> selectedWidgets
DragController.setBehaviorMultipleSelection(boolean)
is disabled.public java.lang.Exception vetoException
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)
.