DropTargetExtensionConnector
and
DragSourceExtensionConnector
@Deprecated public class VDragAndDropManager extends Object
Singleton. Only one drag and drop operation can be active anyways. Use
get()
to get instance.
TODO cancel drag and drop if more than one touches !?
Modifier and Type | Class and Description |
---|---|
static interface |
VDragAndDropManager.DDManagerMediator
Deprecated.
Implementation if this interface is provided as a parameter to
DDEventHandleStrategy methods.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_DRAG_SOURCE_STYLENAME
Deprecated.
|
static int |
MINIMUM_DISTANCE_TO_START_DRAG
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
VDragAndDropManager()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
endDrag()
Deprecated.
Drag is ended (drop happened) on current drop handler.
|
void |
executeWhenReady(com.google.gwt.user.client.Command command)
Deprecated.
Method to execute commands when all existing dd related tasks are
completed (some may require server visit).
|
protected VDropHandler |
findDragTarget(com.google.gwt.dom.client.Element element)
Deprecated.
First seeks the widget from this element, then iterates widgets until one
implement HasDropHandler.
|
static VDragAndDropManager |
get()
Deprecated.
|
protected ApplicationConnection |
getCurrentDragApplicationConnection()
Deprecated.
|
VDropHandler |
getCurrentDropHandler()
Deprecated.
|
protected DDEventHandleStrategy |
getEventHandleStrategy()
Deprecated.
Returns DnD strategy to handle native preview events used by the manager.
|
void |
handleServerResponse(ValueMap valueMap)
Deprecated.
|
void |
interruptDrag()
Deprecated.
The drag and drop operation is ended, but drop did not happen.
|
void |
setCurrentDropHandler(VDropHandler currentDropHandler)
Deprecated.
If drag and drop operation is not handled by
VDragAndDropManager s
internal handler, this can be used to update current VDropHandler
. |
VDragEvent |
startDrag(VTransferable transferable,
com.google.gwt.dom.client.NativeEvent startEvent,
boolean handleDragEvents)
Deprecated.
This method is used to start Vaadin client side drag and drop operation.
|
protected void |
updateDragImagePosition(com.google.gwt.dom.client.NativeEvent gwtEvent,
com.google.gwt.dom.client.Element dragImage)
Deprecated.
|
void |
visitServer(VDragEventServerCallback acceptCallback)
Deprecated.
Visits server during drag and drop procedure.
|
public static final String ACTIVE_DRAG_SOURCE_STYLENAME
public static final int MINIMUM_DISTANCE_TO_START_DRAG
public VDropHandler getCurrentDropHandler()
public void setCurrentDropHandler(VDropHandler currentDropHandler)
VDragAndDropManager
s
internal handler, this can be used to update current VDropHandler
.currentDropHandler
- public static VDragAndDropManager get()
public VDragEvent startDrag(VTransferable transferable, com.google.gwt.dom.client.NativeEvent startEvent, boolean handleDragEvents)
Cancels possible existing drag. TODO figure out if this is always a bug if one is active. Maybe a good and cheap lifesaver thought.
If possible, method automatically detects current VDropHandler
and fires VDropHandler.dragEnter(VDragEvent)
event on it.
May also be used to control the drag and drop operation. If this option
is used, VDropHandler
is searched on mouse events and appropriate
methods on it called automatically.
transferable
- nativeEvent
- handleDragEvents
- if true, VDragAndDropManager
handles the drag and drop
operation GWT event preview.protected void updateDragImagePosition(com.google.gwt.dom.client.NativeEvent gwtEvent, com.google.gwt.dom.client.Element dragImage)
protected VDropHandler findDragTarget(com.google.gwt.dom.client.Element element)
element
- public void endDrag()
public void interruptDrag()
public void visitServer(VDragEventServerCallback acceptCallback)
acceptCallback
- public void handleServerResponse(ValueMap valueMap)
protected DDEventHandleStrategy getEventHandleStrategy()
protected ApplicationConnection getCurrentDragApplicationConnection()
public void executeWhenReady(com.google.gwt.user.client.Command command)
Using this method may be handy if criterion that uses lazy initialization are used. Check
TODO Optimization: consider if we actually only need to keep the last command in queue here.
command
- Copyright © 2018 Vaadin Ltd. All rights reserved.