Class DropEvent
java.lang.Object
com.oorian.messaging.events.Event<DragDropListener>
com.oorian.messaging.events.client.ClientEvent<DragDropListener>
com.oorian.messaging.events.client.DropEvent
Event fired when a dragged element is dropped onto a valid drop target.
This event provides information about the dropped element, its original parent, the new parent it was dropped into, and the updated child ordering of both containers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(DragDropListener listener) Dispatches this event to the specified listener.Returns the element that was dropped.Returns the new parent where the element was dropped.Returns the child IDs of the new parent after the drop.Returns the original parent of the dropped element.Returns the child IDs of the original parent after the drop.voidsetDroppedElement(Element droppedElement) Sets the element that was dropped.voidsetNewParent(Element newParent) Sets the new parent where the element was dropped.voidsetNewParentChildIds(ArrayList<String> newParentChildIds) Sets the child IDs of the new parent after the drop.voidsetOldParent(Element oldParent) Sets the original parent of the dropped element.voidsetOldParentChildIds(ArrayList<String> oldParentChildIds) Sets the child IDs of the original parent after the drop.Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
DropEvent
public DropEvent()Creates a new DropEvent.
-
-
Method Details
-
setDroppedElement
Sets the element that was dropped.- Parameters:
droppedElement- the dropped element
-
setOldParent
Sets the original parent of the dropped element.- Parameters:
oldParent- the original parent element
-
setNewParent
Sets the new parent where the element was dropped.- Parameters:
newParent- the new parent element
-
setOldParentChildIds
Sets the child IDs of the original parent after the drop.- Parameters:
oldParentChildIds- the list of child element IDs in the original parent
-
setNewParentChildIds
Sets the child IDs of the new parent after the drop.- Parameters:
newParentChildIds- the list of child element IDs in the new parent
-
getDroppedElement
Returns the element that was dropped.- Returns:
- the dropped element
-
getOldParent
Returns the original parent of the dropped element.- Returns:
- the original parent element
-
getNewParent
Returns the new parent where the element was dropped.- Returns:
- the new parent element
-
getOldParentChildIds
Returns the child IDs of the original parent after the drop.- Returns:
- the list of child element IDs in the original parent
-
getNewParentChildIds
Returns the child IDs of the new parent after the drop.- Returns:
- the list of child element IDs in the new parent
-
dispatchTo
Dispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<DragDropListener>- Parameters:
listener- the listener to dispatch this event to
-