I was wondering if anyone has implemented the ability to provide a view where the NatTable is used in a virtual manner (over 1million rows) and provides the ability to bookmark rows and allow the ability to get to the bookmarks quickly to view and edit.
If not, does anyone have any good ideas on how I might want to implement this functionality. I would really like the functionality as seen in the Eclipse IDE with the vertical and overview rulers which appear next to documents that allow bookmarking on the overview ruler and users can quickly access the bookmarks on the vertical ruler.
I was thinking of starting with the VerticalRuler but it is tied to an ITextViewer so I am not sure if this the right direction.
The only other idea I can think of is creating my on control docked next to the grid and have it function in a similar manner.
If anyone has any ideas or suggestions, I would really appreciate it.
I was actually playing around with the overview pane idea, but no important insights yet.
We did implement something that might suit your bookmarking needs (if I understand those correctly). It's actually quite a simple implementation:
* Saving a row under some sort of entity (that will include the row number, of course).
* Showing those "saved row" entities in a different view.
* Making the NatTable focus change to the appropriate row number when clicking an "saved row" entity.
I followed your approach and implemented my own solution that consisted of docking a composite next to the grid that looks like similar to the vertical ruler in eclipse that keeps track of bookmarks and allows users to hover over them and take them to the appropriate location in the grid.
I was really hoping to have something integrated with Eclipse (I am using the grid within a plug-in), so I could take advantage of their bookmark view to allow users to further edit the bookmarks. But since I could not find anything I settled on my own home grown solution.
I am actually getting the desired row into view by keeping a pointer to the SelectionLayer and calling selectRow.
This gets the desired row into the view and selects it as well.
Is this different then doing what you mentioned (using the ShowRowInViewportCommand). Am I doing this correctly by exposing and keeping a reference to the SelectionLayer or should I just be going through the nattable object.