> 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:[email protected]] 
Sent: Wednesday, August 08, 2012 2:47 PM
To: [email protected]
Subject: Re: How to block UI input to a disabled/busy TreeNode

On Wed, Aug 8, 2012 at 5:36 PM, Roger L. Whitcomb <[email protected]> 
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

Reply via email to