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 isSelf
.- 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()
Locator
getDragged()
Returns the component locator being dragged and drop toSelf
.int
getDraggedIndex()
Returns itsgetIndex()
(if any) or the child index of the dragged component from its parent.int
getDroppedIndex()
Returns itsgetIndex()
(if any) or the child index of the dropped component from its parent.
-
-
-
Method Detail
-
getDragged
public Locator getDragged()
Returns the component locator being dragged and drop toSelf
. If the library property of"org.zkoss.zul.drop.allowNullDragged"
is specified with"true"
, then the returned value may be null if thedragged
locator is null, otherwise, theNullPointerException
is raised.
-
getDraggedIndex
public int getDraggedIndex()
Returns itsgetIndex()
(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 thegetDragged()
locator is null.
-
getDroppedIndex
public int getDroppedIndex()
Returns itsgetIndex()
(if any) or the child index of the dropped component from its parent.
-
-