Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Row spanning in the row header region
Row spanning in the row header region [message #1776822] Wed, 22 November 2017 02:36 Go to next message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
Today I attempted to implement row spanning in the row header region.

Should this be possible? It hasn't worked for me so far.

I created my own RowHeaderDataProvider that implements both IDataProvider and ISpanningDataProvider.

Then I created a SpanningDataLayer with this RowHeaderDataProvider, and passed this SpanningDataLayer into a DefaultGridLayer.

Should this be working and I've just missed something along the way?

Through debugging I've found that the getCellByPosition method in my RowHeaderDataProvider is never called.
Re: Row spanning in the row header region [message #1776828 is a reply to message #1776822] Wed, 22 November 2017 07:24 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
It looks like this is not supported at the moment. The RowHeaderLayer is a DimensionallyDependentLayer which is an AbstractLayer. As there is no AbstractLayerTransform involved in the class hierarchy, the RowHeaderLayer does not perform a transformation out of the box. At least getCellByPosition() is not implemented in the DimensionallyDependentLayer to ask for the underlying layer cell position.

Not sure if this was simply missed or if there was a reason for not overriding it here. Feel free to create a ticket so we can investigate on this sometime.

In the meanwhile you could try to create a custom RowHeaderLayer that extends the DimensionallyDependentIndexLayer, which should do the transformation.
Re: Row spanning in the row header region [message #1777277 is a reply to message #1776828] Tue, 28 November 2017 02:33 Go to previous messageGo to next message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
So I tried that, and it is kind of working? At least the text in the cell appears where it should as a spanned cell. However, the underlying grid is still painted onto the row header region, as opposed to the spanned grid.

index.php/fa/31411/0/

Any ideas?
Re: Row spanning in the row header region [message #1777281 is a reply to message #1777277] Tue, 28 November 2017 06:05 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2614
Registered: July 2012
Senior Member
Looks like you don't have a cell painter in the row header region that is painting a background.
Re: Row spanning in the row header region [message #1777353 is a reply to message #1777281] Tue, 28 November 2017 18:30 Go to previous message
Louis Detweiler is currently offline Louis DetweilerFriend
Messages: 57
Registered: August 2017
Member
Yup that was it. The background color of the row header region was null so the background was not getting painted. Thanks Dirk!
Previous Topic:Nattable does not display data when using SortHeaderLayer
Next Topic:Cell boundary of underlying cell showing when selecting a spanned cell
Goto Forum:
  


Current Time: Tue Sep 25 20:56:15 GMT 2018

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

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

Back to the top