Skip to main content

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 16:05 Go to next message
desis machino is currently offline desis machinoFriend
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?

Re: How to refresh an individual cell [message #1064109 is a reply to message #1064102] Mon, 17 June 2013 16:42 Go to previous message
Edwin Park is currently offline Edwin ParkFriend
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.

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

Current Time: Thu Dec 05 18:30:13 GMT 2019

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

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

Back to the top