public class Tree.TreeTargetDetails extends AbstractSelect.AbstractSelectTargetDetails
TargetDetails
implementation with Tree specific api.idOver
Modifier and Type | Method and Description |
---|---|
Object |
getItemIdAfter()
If drop is targeted into "folder node" (see
getItemIdInto()
), this method returns the item id of the node after the drag was
targeted. |
Object |
getItemIdInto()
If the event is on a node that can not have children (see
Tree.areChildrenAllowed(Object) ), this method returns the
parent item id of the target item (see AbstractSelect.AbstractSelectTargetDetails.getItemIdOver() ). |
Tree |
getTarget() |
getDropLocation, getItemIdOver
getData, getMouseEvent, setData
public Tree getTarget()
getTarget
in interface TargetDetails
getTarget
in class TargetDetailsImpl
DragAndDropEvent
happened.public Object getItemIdInto()
Tree.areChildrenAllowed(Object)
), this method returns the
parent item id of the target item (see AbstractSelect.AbstractSelectTargetDetails.getItemIdOver()
).
The identifier of the parent node is also returned if the cursor is
on the top part of node. Else this method returns the same as
AbstractSelect.AbstractSelectTargetDetails.getItemIdOver()
.
In other words this method returns the identifier of the "folder" into the drag operation is targeted.
If the method returns null, the current target is on a root node or on other undefined area over the tree component.
The default Tree implementation marks the targetted tree node with CSS classnames v-tree-node-dragfolder and v-tree-node-caption-dragfolder (for the caption element).
public Object getItemIdAfter()
getItemIdInto()
), this method returns the item id of the node after the drag was
targeted. This method is useful when implementing drop into specific
location (between specific nodes) in tree.Copyright © 2019 Vaadin Ltd. All rights reserved.