pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: Based of Path how to get TreeBranch or TreeNode
Date Mon, 08 Jul 2013 19:59:51 GMT
I think what you will need to do is this:

*         Get the root of your tree data as "treeRoot" (for instance, by
doing: "TreeBranch treeRoot = (TreeBranch)treeView.getTreeData();"

*         Iterate through the sequence of paths that are checked
(returned from "getCheckedPaths()".

*         For each path in the list, call "Sequence.Tree.get(treeRoot,
path)" to get the node at that path

*         Then check the type of the node (you could use "if (node
instanceof TreeBranch)" for instance) to see if it is a branch or a leaf
node.

 

HTH,

~Roger Whitcomb

 

From: V SANTOSH PAVAN RAJU Bs [mailto:pavanraju.mca@gmail.com] 
Sent: Monday, July 01, 2013 5:38 AM
To: user@pivot.apache.org
Subject: Based of Path how to get TreeBranch or TreeNode

 

Hi,

 

In using TreeView (checked) i was able to get paths for Checked
TreeBranches and TreeNodes as 

Sequence<Path> paths = treeView.getCheckedPaths();

 

Now i want to test whether these paths are of TreeBranches or TreeNodes?

Because i want to restrict the selection of tree nodes to some number.

 

So is there any way of doing this?

 

-- 
Thanks & Regards

B.S.V.S.Pavan Raju.

Skype: skype_pavan1

Hyderabad.


Mime
View raw message