Class DropData

java.lang.Object
org.zkoss.stateless.action.data.MouseData
org.zkoss.stateless.action.data.DropData
All Implemented Interfaces:
Serializable, ActionData

public class DropData extends MouseData
Represents an action cause by user's dragging and dropping a component.

The component being dragged can be retrieved by getDragged(). The component that received the dragged component is Self.

Author:
jumperchen
See Also:
  • Constructor Details

    • DropData

      public DropData()
  • Method Details

    • getDragged

      public Locator getDragged()
      Returns the component locator being dragged and drop to Self. If the library property of "org.zkoss.zul.drop.allowNullDragged" is specified with "true", then the returned value may be null if the dragged locator is null, otherwise, the NullPointerException is raised.
    • getDraggedIndex

      public int getDraggedIndex()
      Returns its getIndex() (if any) or the child index of the dragged component from its parent. If the library property of "org.zkoss.zul.drop.allowNullDragged" is specified with "true", then the returned value may be -1 if the getDragged() locator is null.
    • getDroppedIndex

      public int getDroppedIndex()
      Returns its getIndex() (if any) or the child index of the dropped component from its parent.
    • getArea

      public String getArea()
      Inherited from MouseData, but not applicable to DropData. It always returns null.
      Overrides:
      getArea in class MouseData
      Returns: