keeping multiple highlighted tree nodes selected

  • Follow


DISCONTIGUOUS_TREE_SELECTION allows me to select and highlight
multiple JTree nodes. I then right click on the highlighted selections
to bring up a popup menu which will affect the configuration of those
nodes, but the problem is when I make that initial right click on the
highlighted nodes, all the selections go away and I'm left w/ a single
selected tree node.

Any ideas how to keep the selection count up when right clicking on
any one of the multiple highlighted nodes and not have them dissappear
except for the one I right click on?

0
Reply Wizumwalt (114) 9/26/2007 7:04:44 PM

On 26 Sep, 20:04, "William Z." <Wizumw...@gmail.com> wrote:
> DISCONTIGUOUS_TREE_SELECTION allows me to select and highlight
> multiple JTree nodes. I then right click on the highlighted selections
> to bring up a popup menu which will affect the configuration of those
> nodes, but the problem is when I make that initial right click on the
> highlighted nodes, all the selections go away and I'm left w/ a single
> selected tree node.
>
> Any ideas how to keep the selection count up when right clicking on
> any one of the multiple highlighted nodes and not have them dissappear
> except for the one I right click on?

Try to stop right-click event propagation, void stopPropagation()
Here I assume that you are overriding the listener already...

0
Reply GArlington 9/27/2007 3:40:08 PM


1 Replies
384 Views

(page loaded in 0.05 seconds)


Reply: