Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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
desis machino is currently offline desis machino
Messages: 10
Registered: May 2013
Junior Member
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
Edwin Park is currently offline Edwin Park
Messages: 124
Registered: July 2009
Senior Member
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:Synchronise two NatTables when scrolling and row resizing.
Next Topic:Exchanging the ICellPainter at runtime?
Goto Forum:
  


Current Time: Wed Jul 30 17:32:04 EDT 2014

Powered by FUDForum. Page generated in 0.01404 seconds