Package com.vaadin.ui
Class Tree.TreeTargetDetails
- java.lang.Object
-
- com.vaadin.event.dd.TargetDetailsImpl
-
- com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails
-
- com.vaadin.ui.Tree.TreeTargetDetails
-
- All Implemented Interfaces:
TargetDetails
,Serializable
- Enclosing class:
- Tree
public class Tree.TreeTargetDetails extends AbstractSelect.AbstractSelectTargetDetails
ATargetDetails
implementation with Tree specific api.- Since:
- 6.3
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails
idOver
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getItemIdAfter()
If drop is targeted into "folder node" (seegetItemIdInto()
), 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 (seeTree.areChildrenAllowed(Object)
), this method returns the parent item id of the target item (seeAbstractSelect.AbstractSelectTargetDetails.getItemIdOver()
).Tree
getTarget()
-
Methods inherited from class com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails
getDropLocation, getItemIdOver
-
Methods inherited from class com.vaadin.event.dd.TargetDetailsImpl
getData, getMouseEvent, setData
-
-
-
-
Method Detail
-
getTarget
public Tree getTarget()
- Specified by:
getTarget
in interfaceTargetDetails
- Overrides:
getTarget
in classTargetDetailsImpl
- Returns:
- the drop target on which the
DragAndDropEvent
happened.
-
getItemIdInto
public Object getItemIdInto()
If the event is on a node that can not have children (seeTree.areChildrenAllowed(Object)
), this method returns the parent item id of the target item (seeAbstractSelect.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 asAbstractSelect.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).
-
getItemIdAfter
public Object getItemIdAfter()
If drop is targeted into "folder node" (seegetItemIdInto()
), 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.- Returns:
- the id of the item after the user targets the drop or null if "target" is a first item in node list (or the first in root node list)
-
-