Package org.opencms.gwt.client.dnd
Interface I_CmsDNDController
- All Known Implementing Classes:
CmsAttributeDNDController
,CmsCompositeDNDController
,CmsContainerpageDNDController
,CmsDropListener
,CmsFavoritesDNDController
,CmsImageDndController
,CmsSitemapDNDController
public interface I_CmsDNDController
Drag and drop controller.
Implement and assign to the CmsDNDHandler
to control the drag process as well as the underlying model.
- Since:
- 8.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onAnimationStart
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when end animation starts.boolean
onBeforeDrop
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed before drop.void
onDragCancel
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drag cancel.boolean
onDragStart
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drag start.void
onDrop
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drop.void
onPositionedPlaceholder
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed after the placeholder has been positioned inside a drop target.boolean
onTargetEnter
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when the helper is dragged into a drop target.void
onTargetLeave
(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when the helper is dragged out of a drop target.default void
postClear
(I_CmsDraggable draggable, I_CmsDropTarget target) Called after the CSS styles are changed back to normal after a DnD operation.default boolean
startPlacementMode
(I_CmsDraggable draggable, CmsDNDHandler handler) Maybe starts placement mode, and returns true if it does so.
-
Method Details
-
onAnimationStart
Executed when end animation starts.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance
-
onBeforeDrop
Executed before drop.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance- Returns:
false
to cancel dropping
-
onDragCancel
Executed on drag cancel.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance
-
onDragStart
Executed on drag start.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance- Returns:
false
to cancel dragging
-
onDrop
Executed on drop.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance
-
onPositionedPlaceholder
void onPositionedPlaceholder(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed after the placeholder has been positioned inside a drop target.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance
-
onTargetEnter
Executed when the helper is dragged into a drop target.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance- Returns:
false
to cancel entering target (placeholder will not positioned inside target)
-
onTargetLeave
Executed when the helper is dragged out of a drop target.- Parameters:
draggable
- the draggable itemtarget
- the current drop targethandler
- the drag and drop handler instance
-
postClear
Called after the CSS styles are changed back to normal after a DnD operation.- Parameters:
draggable
- the draggabletarget
- the drag target (null if drag cancelled)
-
startPlacementMode
Maybe starts placement mode, and returns true if it does so.- Parameters:
draggable
- the item for which placement mode should be activatedhandler
- the DnD handler- Returns:
- true if placement mode has been activated
-