How to refresh an individual cell [message #1064102] |
Mon, 17 June 2013 12:05  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.13071 seconds