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 Details

    • onAnimationStart

      void onAnimationStart(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed when end animation starts.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
    • onBeforeDrop

      boolean onBeforeDrop(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed before drop.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
      Returns:
      false to cancel dropping
    • onDragCancel

      void onDragCancel(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed on drag cancel.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
    • onDragStart

      boolean onDragStart(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed on drag start.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
      Returns:
      false to cancel dragging
    • onDrop

      void onDrop(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed on drop.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
    • onPositionedPlaceholder

      Executed after the placeholder has been positioned inside a drop target.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
    • onTargetEnter

      boolean onTargetEnter(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed when the helper is dragged into a drop target.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
      Returns:
      false to cancel entering target (placeholder will not positioned inside target)
    • onTargetLeave

      void onTargetLeave(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler)
      Executed when the helper is dragged out of a drop target.

      Parameters:
      draggable - the draggable item
      target - the current drop target
      handler - the drag and drop handler instance
    • postClear

      default void postClear(I_CmsDraggable draggable, I_CmsDropTarget target)
      Called after the CSS styles are changed back to normal after a DnD operation.
      Parameters:
      draggable - the draggable
      target - the drag target (null if drag cancelled)
    • startPlacementMode

      default boolean startPlacementMode(I_CmsDraggable draggable, CmsDNDHandler handler)
      Maybe starts placement mode, and returns true if it does so.
      Parameters:
      draggable - the item for which placement mode should be activated
      handler - the DnD handler
      Returns:
      true if placement mode has been activated