Package org.opencms.gwt.client.dnd
Interface I_CmsDraggable
- All Known Subinterfaces:
I_CmsListItem
- All Known Implementing Classes:
CmsAttributeValueView
,CmsCategoryTreeItem
,CmsContainerPageElementPanel
,CmsCreatableListItem
,CmsGalleryTreeItem
,CmsGroupContainerElementPanel
,CmsLazyTreeItem
,CmsLazyTreeItem.LoadingItem
,CmsListItem
,CmsMenuListItem
,CmsModelPageTreeItem
,CmsResultListItem
,CmsSimpleListItem
,CmsSitemapTreeItem
,CmsToolbarClipboardView.CmsClipboardDeletedItem
,CmsTreeItem
public interface I_CmsDraggable
Interface defining all methods used by drag and drop on a draggable element.
- Since:
- 8.0.0
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.base.Optional<int[]>
Gets an optional pair of integers which are to be used as an "offset delta" for the drag and drop process.com.google.gwt.dom.client.Element
getDragHelper
(I_CmsDropTarget target) Creates the drag helper element and attaches it into the DOM.com.google.gwt.dom.client.Element
Returns the draggable element.getId()
Returns the draggable id.Returns the parent drop target ornull
if there is none.com.google.gwt.dom.client.Element
getPlaceholder
(I_CmsDropTarget target) Creates the drag placeholder element.void
Executed on drag cancel.void
onDrop
(I_CmsDropTarget target) Executed on drop.void
onStartDrag
(I_CmsDropTarget target) Executed on drag start.
-
Method Details
-
getCursorOffsetDelta
com.google.common.base.Optional<int[]> getCursorOffsetDelta()Gets an optional pair of integers which are to be used as an "offset delta" for the drag and drop process.- Returns:
- an optional array containing exactly 2 entries [x,y]
-
getDragHelper
Creates the drag helper element and attaches it into the DOM.- Parameters:
target
- the drop target- Returns:
- the drag helper element
-
getElement
com.google.gwt.dom.client.Element getElement()Returns the draggable element.- Returns:
- the element
-
getId
Returns the draggable id.- Returns:
- the id
-
getParentTarget
Returns the parent drop target ornull
if there is none.- Returns:
- the parent drop target
-
getPlaceholder
Creates the drag placeholder element.- Parameters:
target
- the drop target- Returns:
- the drag placeholder element
-
onDragCancel
void onDragCancel()Executed on drag cancel. -
onDrop
Executed on drop.- Parameters:
target
- the drop target
-
onStartDrag
Executed on drag start.- Parameters:
target
- the current drop target
-