pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: Avoid "double click signal" when expanding and collapsing a branch in a TreeViewer
Date Wed, 15 Jun 2011 17:14:27 GMT
No problem.  :-)

On Jun 15, 2011, at 1:11 PM, Edvin Syse wrote:

> Den 15.06.2011 19:00, skrev Greg Brown:
>> Could you possibly use TreeView#getNodeAt() and getNodeIndent() instead of looking
at the style values?
> 
> Hehe.. yes, that was a lot easier (and skin independent):
> 
> Sequence.Tree.Path path = treeView.getNodeAt(y);
> if (path != null) {
>    TreeNode node = (TreeNode) Sequence.Tree.get(treeView.getTreeData(), path);
>    if (node instanceof TreeBranch) {
>        if (x > treeView.getNodeIndent(path.getLength()))
>            doubleClicked(node);
>    } else {
>        doubleClicked(node);
>    }
> }
> 
> Thank you so much :)
> 
> -- Edvin


Mime
View raw message