TableView API, no lazy retrieval of visible cell content possible?
Robert Krüger
krueger at lesspain.de
Wed Jan 28 16:57:03 UTC 2015
On Wed, Jan 28, 2015 at 5:55 PM, Robert Krüger <krueger at lesspain.de> wrote:
> OK, I investigated some more.
>
> What is weird is that the same table cell instance (I checked the Object
> hashcode) is set to different model values while it is still visible, i.e.
> I get sequences like this in the log, just when I display the table:
>
> Updating cell 673139775 from null with Image reference for Row 0
> Adding Row 0 to image load queue
> Updating cell 673139775 from Image reference for Row 0 with Image
> reference for Row 1
> Adding Row 1 to image load queue
> Dequeueing image for Row 0
> Updating cell 673139775 from Image reference for Row 1 with Image
> reference for Row 2
> Adding Row 2 to image load queue
> Dequeueing image for Row 1
> Updating cell 673139775 from Image reference for Row 2 with Image
> reference for Row 3
> Adding Row 3 to image load queue
> Dequeueing image for Row 2
> Updating cell 673139775 from Image reference for Row 3 with Image
> reference for Row 4
> Adding Row 4 to image load queue
> Dequeueing image for Row 3
> Updating cell 673139775 from Image reference for Row 4 with Image
> reference for Row 5
> Adding Row 5 to image load queue
> Dequeueing image for Row 4
> Updating cell 673139775 from Image reference for Row 5 with Image
> reference for Row 6
> Adding Row 6 to image load queue
> Dequeueing image for Row 5
>
> This means that I cannot rely on the same table cell to be used for
> displaying the content while its row is visible (+ a bit of buffered rows
> around the visible area) and that means the whole approach will not work.
>
> It would really be great if someone from Oracle could comment here. None
> of this behaviour is documented in the API so it seems that using this is
> really relying on implementation details and I have found any other options
> to achieve that. The behaviour of the application as it is
>
this should be "I have _not_ found ..."
> now is that randomly some images are never loaded, because they are
> quickly removed from the load queue because the cell's content is
> overwritten while it is still being displayed.
>
>
>
More information about the openjfx-dev
mailing list