Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Tracking TableViewer' row number
Tracking TableViewer' row number [message #715762] Mon, 15 August 2011 08:37 Go to next message
Setya Mising name is currently offline Setya Mising name
Messages: 484
Registered: July 2009
Senior Member
Hi,

I need to have information on TableViewer's row index currently being rendered. I've overridden ColumnLabelProvider#update to increment index when this method is invoked, but when user clicks rows, this method is also invoked causing the index to get incremented even it's not appropriate to do so.

Any help would be greatly appreciated.

Regards,

Setya



Re: Tracking TableViewer' row number [message #715781 is a reply to message #715762] Mon, 15 August 2011 10:37 Go to previous message
Setya Mising name is currently offline Setya Mising name
Messages: 484
Registered: July 2009
Senior Member
Nevermind, I can do this using the following snippet:


TableItem tableItem = (TableItem)cell.getItem();
row = tableItem.getParent().indexOf(tableItem);

Regards,

Setya
Previous Topic:Check box with text in the tool bar
Next Topic:the use of IProgressService
Goto Forum:
  


Current Time: Sun Apr 20 12:20:44 EDT 2014

Powered by FUDForum. Page generated in 0.01774 seconds