I think your first point is actually distinct (although related) to your second one.
The current implementation of TreeView which uses a "disabledNodeFilter" and detects disabled nodes by calling the "isNodeDisabled(path)" (which uses the filter, if installed) is very usable without having to add a different interface. Adding a style to the TerraTreeViewSkin to disable any mouse events on nodes that respond "true" to "isNodeDisabled(path)" is doable without changing the current way that disabled nodes are determined. I think this is a fairly simple change. So, I'm not sure I see the advantages of having the TreeView maintain a separate "disabled" state when the disabled filter is already available as the mechanism for doing this.... ~Roger -----Original Message----- From: Josh R [mailto:[email protected]] Sent: Thursday, August 23, 2012 1:40 PM To: [email protected] Subject: Re: How to block UI input to a disabled/busy TreeNode On Thu, Aug 23, 2012 at 3:45 PM, Roger L. Whitcomb <[email protected]> wrote: > So, what you would like is for TreeView / TerraTreeViewSkin to keep track of > the node enable/disable state and so instead of the application implementing > a disabledNodeFilter the app would traverse the nodes on its own and call > setNodeEnabled() on each and have TreeView keep (duplicate) track of the > state? > Yes, you got it. The TreeView would need to track disabled nodes(and the apps will track them internally too). I think a new field in NodeInfo(?) or whichever object that maintains the state. I think I saw some bit-flag(in TerraTreeSkin) somewhere. But I don't know if it can be of help. The apps will any way create their own Object and stash it using setUserData. And in response to some external event (link to the host is down or host is unreachable), the app can set it's internal field and then call disableMouse() or disableUI(). Hope this example helps. > Just trying to understand. > > And so what you're really asking for is a method in Component / ComponentSkin > to disable UI interaction on disabled components in general? > Sorry, I'm not an expert and so I don't know when you say ComponentSkin.But, yes some method to disable mouse events on a disabled node. > ~Roger thanks
