Skip to main content



      Home
Home » Eclipse Projects » NatTable » How to refresh an individual cell(How to refresh an individual cell when data is backed by very large list)
How to refresh an individual cell [message #1064102] Mon, 17 June 2013 12:05 Go to next message
Eclipse UserFriend
I am trying to use NatTable in a virtual manner, where my actual data is backed by a binary file. When a table is showing some of the data, only that data will be extracted and rendered on the table.

What I would like to do next, is if any of the viewed data is changed, then have that reflected on the grid so the user will see the updated value.

I have seen examples using Glazed lists and the GlazedListsEventLayer. However in these examples, the entire list is first created and traversed and propertyChangeListeners registered for each list instance.

Since I have a very large list, and will not keep all of them instantiated in memory, I was hoping, since I know when a change has occurred, and I can figure out what row/col that change is associated with, if I could see what rows/cols are currently being displayed, and if the one changed is displayed, then I could force the cell showing that data to refresh itself.

Is this possible? Are there any examples that might help me with this? Or is there something in the Glazed lists library that deals with handling large data lists where not all the elements in the entire list need to be instantiated for the list to be used?

Thanks.
Re: How to refresh an individual cell [message #1064109 is a reply to message #1064102] Mon, 17 June 2013 12:42 Go to previous message
Eclipse UserFriend
Yup, you can certainly do this. Just fire a CellVisualChangeEvent from your DataLayer when your data changes, and NatTable will update itself accordingly. If the change is happening outside the visible area of the viewport, NatTable is smart enough to know not to redraw in that case.

Cheers,
Edwin
Previous Topic:Exchanging the ICellPainter at runtime?
Next Topic:how to force refresh of child rows in tree grid
Goto Forum:
  


Current Time: Sat Jul 05 10:24:55 EDT 2025

Powered by FUDForum. Page generated in 0.13071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top