Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Ability to bookmark rows
Ability to bookmark rows [message #1092316] Thu, 22 August 2013 15:58 Go to next message
desis machino is currently offline desis machino
Messages: 10
Registered: May 2013
Junior Member
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.

Thanks.
Re: Ability to bookmark rows [message #1094757 is a reply to message #1092316] Mon, 26 August 2013 06:34 Go to previous messageGo to next message
Noga Rotman is currently offline Noga Rotman
Messages: 23
Registered: June 2013
Junior Member
Hi Desis,

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.


Regards,
Noga
Re: Ability to bookmark rows [message #1095267 is a reply to message #1094757] Mon, 26 August 2013 21:26 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1339
Registered: July 2012
Senior Member
Hi,

in NatTable there is the ShowRowInViewportCommand which should move the row with the given index into the viewport.

I haven't tested it before and I know that there is an issue regarding this when using the TextPainter configured to calculate the row heights dynamically. But maybe it is worth a try.

Greez,
Dirk
Re: Ability to bookmark rows [message #1095938 is a reply to message #1094757] Tue, 27 August 2013 18:56 Go to previous messageGo to next message
desis machino is currently offline desis machino
Messages: 10
Registered: May 2013
Junior Member
Thanks Noga,

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.
Re: Ability to bookmark rows [message #1095943 is a reply to message #1095267] Tue, 27 August 2013 19:01 Go to previous messageGo to next message
desis machino is currently offline desis machino
Messages: 10
Registered: May 2013
Junior Member
Thanks Dirk,

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.
Re: Ability to bookmark rows [message #1095966 is a reply to message #1095943] Tue, 27 August 2013 19:42 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1339
Registered: July 2012
Senior Member
Usually I suggest to use the commands rather than exposing the internals of your layer composition.

Instead of calling selectRow you could fire the SelectRowCommand for example.
Previous Topic:BlinkLayer with GroupByDataLayer
Next Topic:need checkbox only when editable
Goto Forum:
  


Current Time: Fri Oct 24 15:27:14 GMT 2014

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

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