com.vaadin.flow.component.dnd.internal.
Class DndUtil
Internal class for drag and drop related utility methods. This class is not meant for external usage and can be removed at any point.
Since:
2.0
Author:
Vaadin Ltd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Resource path for importing dnd connector.
static final String
Key for storing server side drag data for a
DragSource
.static final String
Key for storing server side drag image for a
DragSource
.static final String
Property name for storing the
DropEffect
on element level.static final String
Property name for storing drop target activity data for an element.
static final String
Property name for storing the
EffectAllowed
on element level.static final String
Key for storing an internal drag end listener registration for a
DragSource
.static final String
Key for storing an internal drag start listener registration for a
DragSource
. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Reports DnD feature usage from mixin interfaces.
static <T extends Component>
voidupdateDragSourceActivation
(DragSource<T> dragSource) Triggers drag source activation method in JS connector once when the component has been attached.
static <T extends Component>
voidupdateDropTargetActivation
(DropTarget<T> dropTarget) Triggers drop target activation method in JS connector once when the component has been attached.
-
Field Details
-
DND_CONNECTOR
Resource path for importing dnd connector.
See Also:
-
EFFECT_ALLOWED_ELEMENT_PROPERTY
Property name for storing the
EffectAllowed
on element level.See Also:
-
DRAG_SOURCE_DATA_KEY
Key for storing server side drag data for a
DragSource
.See Also:
-
DRAG_SOURCE_IMAGE
Key for storing server side drag image for a
DragSource
.See Also:
-
START_LISTENER_REGISTRATION_KEY
Key for storing an internal drag start listener registration for a
DragSource
.See Also:
-
END_LISTENER_REGISTRATION_KEY
Key for storing an internal drag end listener registration for a
DragSource
.See Also:
-
DROP_TARGET_ACTIVE_PROPERTY
Property name for storing drop target activity data for an element.
See Also:
-
DROP_EFFECT_ELEMENT_PROPERTY
Property name for storing the
DropEffect
on element level.See Also:
-
-
Method Details
-
updateDragSourceActivation
Triggers drag source activation method in JS connector once when the component has been attached.
Type Parameters:
T
- the type of the drag source componentParameters:
dragSource
- the drag source to update active status on -
updateDropTargetActivation
Triggers drop target activation method in JS connector once when the component has been attached. Will make sure the activation in JS is done again when the component is detached and attached again, because otherwise the element will not be a drop target again.
Type Parameters:
T
- the type of the drop target componentParameters:
dropTarget
- the drop target to update active status on -
reportUsage
public static void reportUsage()Reports DnD feature usage from mixin interfaces.
-