Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Problems with ColumnGroupHeaderLayer in a Grid
Problems with ColumnGroupHeaderLayer in a Grid [message #1072731] Tue, 23 July 2013 11:46 Go to next message
Joachim Fuchs is currently offline Joachim FuchsFriend
Messages: 34
Registered: February 2013
Member
Hi,

how to put a ColumnGroupHeaderLayer into a grid?

CompositeLayer gridLayer = new CompositeLayer(1, 3);
gridLayer.setChildLayer(GridRegion.COLUMN_GROUP_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnHeaderLayer, 0, 1);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 2);

or
CompositeLayer gridLayer = new CompositeLayer(1, 2);
gridLayer.setChildLayer(GridRegion.COLUMN_GROUP_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 1);

???????

Both ways it looks broken somehow. The example comes with a full grid layer but I do not want the row header.

Any help is appreciated.

J

Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1072744 is a reply to message #1072731] Tue, 23 July 2013 12:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
What about

CompositeLayer gridLayer = new CompositeLayer(1, 2);
gridLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 1);


Not sure, haven't tried that before.
Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1073371 is a reply to message #1072744] Wed, 24 July 2013 16:01 Go to previous messageGo to next message
Joachim Fuchs is currently offline Joachim FuchsFriend
Messages: 34
Registered: February 2013
Member
That one worked.

BTW: What is the preferrable way to work with column groups, via the ColumnGroupModel or the ColumnGroupHeaderLayer? I noticed that there are some issues/uncertainties with collapsing, setting groups collapseable and resizing collapsed columns.

Do you have any hints on column grouping?

J
Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1073608 is a reply to message #1073371] Thu, 25 July 2013 07:01 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Well the column grouping is something that needs to be reworked completely. There are a lot of inconsistencies regarding API and usage.

It should be working on the ColumnGroupHeaderLayer and hide the ColumnGroupModel from the rest of the world. And then we should use commands for all the actions regarding grouping. I'm not sure, but AFAIK this is not consistent for all actions.
Previous Topic:[ColumnReorderEvent] Possible inconsistent behavior
Next Topic:Export NatTable "as is" to image
Goto Forum:
  


Current Time: Fri Apr 26 14:32:27 GMT 2024

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

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

Back to the top