TableViews Shift+Click multi-selection issues

Matthew Elliot matthew.james.elliot at gmail.com
Sun Jul 22 13:35:02 UTC 2018


Hi all,

I hope this is an easy question but I haven't been able to find an answer
in the internet.

I have a TreeTable with multi-selection enabled and I am listing to the
selectedItems() property.

When I shift+click with the mouse to select more than 1 row I always first
get notified there are 0 elements due to a clearSelection call inside the
implementation and then notified of the selected elements. (2 calls)

It would seem TreeTable should support this operation atomically (code is
there) but that the way the mouse click bubbles through the table
implementation it does so without triggering the isAtomic() option and
therefore multiple notifications are triggered against selectedItems().

For me this is problematic as the clear has a meaning in the application,
e.g. unselect and I want to happen in some cases but definitely not in this
case. Click unselect vs Shift + Click to multi-select.

Conversely control clicking is fine as it will simply add to the selection.

Is this a bug in the implementation of selection or a misunderstanding on
my end?

In any case, is there an obvious way to work around this whereby in the
shift select case I can make this operation appear atomic even if the
control will not?

Thanks in advance,
Matt


More information about the openjfx-dev mailing list