Package org.zkoss.stateless.action.data

## Class DropData

- java.lang.Object
- - org.zkoss.stateless.action.data.MouseData
  - - org.zkoss.stateless.action.data.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

- - ### Field Summary

    - ### Fields inherited from class org.zkoss.stateless.action.data.MouseData

      `ALT_KEY, CTRL_KEY, LEFT_CLICK, META_KEY, MIDDLE_CLICK, RIGHT_CLICK, SHIFT_KEY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DropData()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getArea()` | Inherited from `MouseData`, but not applicable to `DropData`.
    `Locator` | `getDragged()` | Returns the component locator being dragged and drop to `Self`.
    `int` | `getDraggedIndex()` | Returns its `getIndex()` (if any) or the child index of the dragged component from its parent.
    `int` | `getDroppedIndex()` | Returns its `getIndex()` (if any) or the child index of the dropped component from its parent.

    - ### Methods inherited from class org.zkoss.stateless.action.data.MouseData

      `getKeys, getPageX, getPageY, getWhich, getX, getY, isAltKey, isCtrlKey, isMetaKey, isShiftKey`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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: