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: How to block UI input to a disabled/busy TreeNode
Date Wed, 08 Aug 2012 21:57:49 GMT
> Can something like this work?

Um, not quite.  The skin can only be set once, so you would have to create a new component:
MyTreeView and a new skin MyTerraTreeViewSkin, and in the constructor of the MyTreeView call
"setSkin" to your MyTreeViewSkin.

But, otherwise your MyTreeViewSkin would override "mouseClick" as you suggest, so that part
should be okay.

~Roger


-----Original Message-----
From: Josh R [mailto:tripanonyr@gmail.com] 
Sent: Wednesday, August 08, 2012 2:47 PM
To: user@pivot.apache.org
Subject: Re: How to block UI input to a disabled/busy TreeNode

On Wed, Aug 8, 2012 at 5:36 PM, Roger L. Whitcomb <Roger.Whitcomb@actian.com> wrote:

<snip>

>
> So, you would need to make a new style in TerraTreeViewSkin (with get/set methods). 
Then if the style value is set, then when you get an input event (mouse click), get the tree
node in that position and check if there is a disabled filter set, check the node with the
filter and if the node is included, then eat the mouse click....
>

Thanks for the explanation. Can something like this work?

class MyTreeSkin extends TerraTreeViewSkin  {  // for now as a quick hack - override mouseClick
(...)  // then in mouseClick check which node was clicked and then check the state of that
node and decide whether or not to consume this click.
}

and then:
my_tree.getTreeViewSelectionListeners().add(new MyTreeSkin());


> ~Roger

thanks
Mime
View raw message