public class DndUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DND_CONNECTOR
Resource path for importing dnd connector.
|
static String |
DND_CONNECTOR_COMPATIBILITY
Resource path for importing dnd connector for compatibility mode.
|
static String |
DRAG_SOURCE_DATA_KEY
Key for storing server side drag data for a
DragSource . |
static String |
DROP_EFFECT_ELEMENT_PROPERTY
Property name for storing the
DropEffect on element level. |
static String |
DROP_TARGET_ACTIVE_PROPERTY
Property name for storing drop target activity data for an element.
|
static String |
EFFECT_ALLOWED_ELEMENT_PROPERTY
Property name for storing the
EffectAllowed on element level. |
static String |
END_LISTENER_REGISTRATION_KEY
Key for storing an internal drag end listener registration for a
DragSource . |
static String |
START_LISTENER_REGISTRATION_KEY
Key for storing an internal drag start listener registration for a
DragSource . |
Modifier and Type | Method and Description |
---|---|
static void |
addDndConnectorWhenComponentAttached(Component component)
Includes the dnd connector when the component is attached to a UI.
|
static void |
addMobileDndPolyfillIfNeeded(Component component)
Adds the mobile dnd polyfills when a iOS device is used.
|
static void |
reportUsage()
Reports DnD feature usage from mixin interfaces.
|
static <T extends Component> |
updateDragSourceActivation(DragSource<T> dragSource)
Triggers drag source activation method in JS connector once when the
component has been attached.
|
static <T extends Component> |
updateDropTargetActivation(DropTarget<T> dropTarget)
Triggers drop target activation method in JS connector once when the
component has been attached.
|
public static final String DND_CONNECTOR_COMPATIBILITY
public static final String DND_CONNECTOR
public static final String EFFECT_ALLOWED_ELEMENT_PROPERTY
EffectAllowed
on element level.public static final String DRAG_SOURCE_DATA_KEY
DragSource
.public static final String START_LISTENER_REGISTRATION_KEY
DragSource
.public static final String END_LISTENER_REGISTRATION_KEY
DragSource
.public static final String DROP_TARGET_ACTIVE_PROPERTY
public static final String DROP_EFFECT_ELEMENT_PROPERTY
DropEffect
on element level.public static void addDndConnectorWhenComponentAttached(Component component)
This is only for the case when the project is in compatibility mode and
the static methods in DragSource
and DropTarget
are used, because otherwise the connector is not loaded.
component
- the component that should be attached and uses dnd connectorpublic static void addMobileDndPolyfillIfNeeded(Component component)
component
- the component using dndpublic static <T extends Component> void updateDragSourceActivation(DragSource<T> dragSource)
T
- the type of the drag source componentdragSource
- the drag source to update active status onpublic static <T extends Component> void updateDropTargetActivation(DropTarget<T> dropTarget)
T
- the type of the drop target componentdropTarget
- the drop target to update active status onpublic static void reportUsage()
Copyright © 2023. All rights reserved.