Interface I_CmsDropTarget

All Known Subinterfaces:
I_CmsDropContainer, I_CmsNestedDropTarget
All Known Implementing Classes:
CmsContainerPageContainer, CmsGroupContainerElementPanel, CmsLazyTree, CmsList, CmsTree, CmsValuePanel

public interface I_CmsDropTarget
Interface defining all methods needed for a drag and drop target. These will mostly be called by the drag and drop handler.

Since:
8.0.0
  • Method Details

    • checkPosition

      boolean checkPosition(int x, int y, CmsDNDHandler.Orientation orientation)
      Returns true if the given cursor position is over the drop target.

      Parameters:
      x - the cursor client x position
      y - the cursor client y position
      orientation - the drag and drop orientation
      Returns:
      true if the given cursor position is over the drop target
    • getElement

      com.google.gwt.dom.client.Element getElement()
      Returns the drop target element.

      This must be the element, where all children will be attached.

      Returns:
      the element
    • getPlaceholderIndex

      Returns the index of the placeholder or -1 if no placeholder is attached.

      Returns:
      the index
    • insertPlaceholder

      void insertPlaceholder(com.google.gwt.dom.client.Element placeholder, int x, int y, CmsDNDHandler.Orientation orientation)
      Inserts a new placeholder.

      Parameters:
      placeholder - the placeholder element
      x - the cursor client x position
      y - the cursor client y position
      orientation - the drag and drop orientation
    • onDrop

      void onDrop(I_CmsDraggable draggable)
      Executed on drop.

      Parameters:
      draggable - the draggable being dropped
    • removePlaceholder

      Removes the placeholder.

    • repositionPlaceholder

      void repositionPlaceholder(int x, int y, CmsDNDHandler.Orientation orientation)
      Repositions the placeholder.

      Parameters:
      x - the cursor client x position
      y - the cursor client y position
      orientation - the drag and drop orientation