Package muntjac :: Package ui :: Module tree :: Class TreeTargetDetails
[hide private]
[frames] | no frames]

Class TreeTargetDetails

source code

                                object --+            
                                         |            
    event.dd.target_details.ITargetDetails --+        
                                             |        
event.dd.target_details_impl.TargetDetailsImpl --+    
                                                 |    
       abstract_select.AbstractSelectTargetDetails --+
                                                     |
                                                    TreeTargetDetails

A TargetDetails implementation with Tree specific api.

Instance Methods [hide private]
 
__init__(self, rawVariables, tree)
Constructor that automatically converts itemIdOver key to corresponding item Id
source code
 
getTarget(self)
Returns: the drop target on which the DragAndDropEvent happened.
source code
 
getItemIdInto(self)
If the event is on a node that can not have children (see Tree.areChildrenAllowed), this method returns the parent item id of the target item (see getItemIdOver ).
source code
 
getItemIdAfter(self)
If drop is targeted into "folder node" (see getItemIdInto), this method returns the item id of the node after the drag was targeted.
source code

Inherited from abstract_select.AbstractSelectTargetDetails: getDropLocation, getItemIdOver

Inherited from event.dd.target_details_impl.TargetDetailsImpl: getData, setData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, rawVariables, tree)
(Constructor)

source code 

Constructor that automatically converts itemIdOver key to corresponding item Id

Overrides: object.__init__
(inherited documentation)

getTarget(self)

source code 
Returns:
the drop target on which the DragAndDropEvent happened.
Overrides: event.dd.target_details.ITargetDetails.getTarget
(inherited documentation)

getItemIdInto(self)

source code 

If the event is on a node that can not have children (see Tree.areChildrenAllowed), this method returns the parent item id of the target item (see 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 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(self)

source code 

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)