Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Cannot print nattable to the correct size
Cannot print nattable to the correct size [message #1692579] Thu, 16 April 2015 15:41 Go to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
I am trying to print the nattable. But I am getting some strange behaviour and I am trying to understand what is happening. I am not able to print it on the whole paper. See attached image.
Also, there is only one header column which prints correctly with the right size. Nothing else in the table prints in the right size. Please help. Thanks.
Re: Cannot print nattable to the correct size [message #1692581 is a reply to message #1692579] Thu, 16 April 2015 15:43 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
How do you try to print?
Re: Cannot print nattable to the correct size [message #1692636 is a reply to message #1692581] Fri, 17 April 2015 07:21 Go to previous messageGo to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
I use the following:
natTable.doCommand(new PrintCommand(natTable
                .getConfigRegistry(), natTable.getShell()));


I have registered the PrintCommandHandler with the composite layer underneath the nattable.

[Updated on: Fri, 17 April 2015 07:35]

Report message to a moderator

Re: Cannot print nattable to the correct size [message #1692639 is a reply to message #1692636] Fri, 17 April 2015 07:34 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
Then org.eclipse.nebula.widgets.nattable.print.LayerPrinter should deal with the upscaling. Not sure what is different in your code to the code in the examples.
Re: Cannot print nattable to the correct size [message #1692642 is a reply to message #1692639] Fri, 17 April 2015 07:40 Go to previous messageGo to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
What could be the reason for that one header cell to be printed correctly?
Re: Cannot print nattable to the correct size [message #1692646 is a reply to message #1692642] Fri, 17 April 2015 07:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
Quote:
I have registered the PrintCommandHandler with the composite layer underneath the nattable.


If you did it like shown in _801_VerticalCompositionWithFeaturesExample in the Additional Feature examples of the NatTable Examples Application, it should work.
Re: Cannot print nattable to the correct size [message #1693160 is a reply to message #1692646] Wed, 22 April 2015 07:44 Go to previous messageGo to next message
Shafi Vijapurwala is currently offline Shafi VijapurwalaFriend
Messages: 13
Registered: November 2014
Junior Member
Hi Dirk,
I figured that the printing was not correct because I was setting two different instances of composite layer on the nattable. Once, I pass the composite layer as a constructor argument. Later, I create different compositelayer and use nattable.setLayer(compositelayer). This is causing printing issues.

My question is, how can I remove a layer from nattable, so that I can use a new composite layer? Also, how can I remove childlayer from composite layer?
Thanks.
Re: Cannot print nattable to the correct size [message #1693172 is a reply to message #1693160] Wed, 22 April 2015 08:53 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
I'm not sure if this use case is supported that easily. Because there might be several configurations connected to the initial layers. Simply exchanging the layer stack can therefore cause serious issues because of now invalid references.

From my point of view you should exchange the whole NatTable instance in your UI, not only switching the layers.
Previous Topic:Hide and Show All Columns
Next Topic:Nabula Nattable using in Rich Client Platform When open in new tab click on menu item select
Goto Forum:
  


Current Time: Thu Mar 04 01:37:51 GMT 2021

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

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

Back to the top