Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Adding image to the column cell in nat table(Adding image to the column cell in nat table)
icon5.gif  Adding image to the column cell in nat table [message #1069128] Mon, 15 July 2013 08:02 Go to next message
kondal kolipaka is currently offline kondal kolipaka
Messages: 5
Registered: July 2009
Junior Member
Hello Experts,

Could you guys give some pointers on how to add image to the column cell.

Single column cell should look like below:
[checkbox image][windows8 image][Windows 8]

I am unable to attach screenshot for that, so representing column cell like below.

Is there anything called 'image provider' to cell in Nat table , like the way we do it in Tree viewer label provider.

Thanks,
KK
Re: Adding image to the column cell in nat table [message #1069132 is a reply to message #1069128] Mon, 15 July 2013 08:13 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1289
Registered: July 2012
Senior Member
No there are no providers in NatTable like for JFace viewers.

We use special painters in cells. Have a look here: http://eclipse.org/nattable/documentation.php?page=styling
Re: Adding image to the column cell in nat table [message #1069210 is a reply to message #1069132] Mon, 15 July 2013 12:23 Go to previous messageGo to next message
kondal kolipaka is currently offline kondal kolipaka
Messages: 5
Registered: July 2009
Junior Member
Thanks Dirk,link was helpful.
Could you please help out in writing a cell painter displaying 3 elements(first one is checkbox painter, next is image painter,then followed by Text painter) in single column cell.

Thanks a lot.
-KK
Re: Adding image to the column cell in nat table [message #1069221 is a reply to message #1069210] Mon, 15 July 2013 12:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1289
Registered: July 2012
Senior Member
Use a TextPainter, decorate it (CellPainterDecorator) with an ImagePainter, use the resulting painter as base painter of another decorator and decorate it with a CheckboxPainter
Re: Adding image to the column cell in nat table [message #1069244 is a reply to message #1069210] Mon, 15 July 2013 13:53 Go to previous message
kondal kolipaka is currently offline kondal kolipaka
Messages: 5
Registered: July 2009
Junior Member
Thanks a lot. It worked out.

-Kondal

[Updated on: Mon, 15 July 2013 13:56]

Report message to a moderator

Previous Topic:Filter multiple items in a dropdown.
Next Topic:how to distinguish the selection of a column header of the selection of all the cells under this col
Goto Forum:
  


Current Time: Sun Sep 21 14:14:57 GMT 2014

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

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