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 12:37 Go to next message
Setya Mising name is currently offline Setya Mising name
Messages: 486
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 14:37 Go to previous message
Setya Mising name is currently offline Setya Mising name
Messages: 486
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: Sat Oct 25 07:21:07 GMT 2014

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

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