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
A TargetDetails
implementation with Tree specific api.
- Since:
- 6.3
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTarget
public Tree getTarget()
- Specified by:
getTarget
in interface TargetDetails
- Overrides:
getTarget
in class TargetDetailsImpl
- 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 (see
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).
getItemIdAfter
public 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. 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)
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.