Class DropData

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Constructor Detail

      • DropData

        public DropData()
    • Method Detail

      • 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 java.lang.String getArea()
        Inherited from MouseData, but not applicable to DropData. It always returns null.
        Overrides:
        getArea in class MouseData
        Returns: