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 TypeMethodDescriptionvoidonAnimationStart(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when end animation starts.booleanonBeforeDrop(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed before drop.voidonDragCancel(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drag cancel.booleanonDragStart(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drag start.voidonDrop(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed on drop.voidonPositionedPlaceholder(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed after the placeholder has been positioned inside a drop target.booleanonTargetEnter(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when the helper is dragged into a drop target.voidonTargetLeave(I_CmsDraggable draggable, I_CmsDropTarget target, CmsDNDHandler handler) Executed when the helper is dragged out of a drop target.default voidpostClear(I_CmsDraggable draggable, I_CmsDropTarget target) Called after the CSS styles are changed back to normal after a DnD operation.default booleanstartPlacementMode(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:
falseto 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:
falseto 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:
falseto 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
-