pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh R <tripano...@gmail.com>
Subject Re: How to block UI input to a disabled/busy TreeNode
Date Tue, 21 Aug 2012 02:09:03 GMT
On Mon, Aug 20, 2012 at 2:58 PM, Roger L. Whitcomb
<Roger.Whitcomb@actian.com> wrote:
> Hi Josh,
>         So, I did some more studying and found a couple of things:
> 1) The code that actually processes context menus is in ApplicationContext.java (starting
around line 928, if you've got the source code).
> 2) The logic that starts the process is in the "mouseDown" event handling (not "mouseClick"
as we had it).
> 3) You could do (one of or both of) two things to disable the popup being shown:
>         a) Return "true" (consumed) from the "mouseDown" handler of your tree in the
case of a disabled node.

This works. I deleted mouseClick and moved the code in mouseDown. The
event is no longer propagated to the contextMenu handler.

>         b) Return "true" (configured) from the "configureContextMenu" handler of your
tree, BUT don't add any Menu.Sections to the menu in this case.
> HTH,
> ~Roger


View raw message