Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Cell decoration
Cell decoration [message #1726276] Thu, 10 March 2016 23:15 Go to next message
Carsten Tsara is currently offline Carsten TsaraFriend
Messages: 11
Registered: March 2016
Junior Member
Hi,
I've found here https://eclipse.org/nattable/documentation.php?page=editing (Text editor control decoration) an example how to use ControlDecoration with the editor of the cell. Can it be used with cells (cell is not a control, right? It's just painted on canvas)
What I want to do is a table validation, where cells with errors have such an error decorator at the corner of the cell with the tooltip on mouse hovering
Re: Cell decoration [message #1726328 is a reply to message #1726276] Fri, 11 March 2016 13:41 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Then you need to use a CellPainterDecorator and use that decorator painter in case your cell contains invalid data. Since that means you have a weak validation (because your data model can contain invalid data, which is not possible in case you have strict validation on editing), you need some additional configuration as explained in my blog post: http://blog.vogella.com/2013/03/02/crossweak-validation-in-nattable-by-dirk-fauth/
Re: Cell decoration [message #1726496 is a reply to message #1726328] Mon, 14 March 2016 10:11 Go to previous message
Carsten Tsara is currently offline Carsten TsaraFriend
Messages: 11
Registered: March 2016
Junior Member
Thanks. And also I want to show error image at the CornerLayer, if errorrs in table are found.
I've add IConfigLabelAccumulator to CornerLayer and also there is IConfiguration with specific style with CellPainter. But I don't see any image at the corner (though in table cells with according label I can see image). And I've noticed that accumulateConfigLabels() of my corner ConfigLabelAccumulator is never called
Previous Topic:Programmatically sorting works only when column is visible
Next Topic: auto increment or copy cell values on dragging column
Goto Forum:
  


Current Time: Fri Apr 26 20:37:15 GMT 2024

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

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

Back to the top