[REVIEW REQUEST] RT-33442: isSelected in TableViewSelectionModel is called too many times
Jonathan Giles
jonathan.giles at oracle.com
Mon Oct 21 12:15:25 PDT 2013
On 22/10/2013 2:35 a.m., Stephen F Northover wrote:
> 1) Is it possible to do the optimization without adding API (ugly but
> safe)?
There are aspects of the optimisation that can be done without adding
API. However, in my testing this API change is the most important of the
changes, so without it there would be some, but much less, benefit of
including the other changes.
> 2) Another alternative (ugly) is to add the API but make it return a
> boolean indicating whether it happened or not.
Sure, I'm fine with this if this is the desired approach.
> 3) It seem really weird to me that you can't convert from Column to
> index and back again. What about getColumns()?
The reason why this is the case is that TableSelectionModel is control
independent, so it does not have the TableView or TreeTableView
available to it. If it did these translations would be trivial (and are
done all the time). This is why TableSelectionModel is currently a
no-op, whereas the actual TableSelectionModel implementations (hidden
within TableView and TreeTableView) can do precisely this.
-- Jonathan
More information about the openjfx-dev
mailing list