Skip to main content



      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 11:41 Go to next message
Eclipse UserFriend
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 11:43 Go to previous messageGo to next message
Eclipse UserFriend
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 03:21 Go to previous messageGo to next message
Eclipse UserFriend
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 03:35] by Moderator

Re: Cannot print nattable to the correct size [message #1692639 is a reply to message #1692636] Fri, 17 April 2015 03:34 Go to previous messageGo to next message
Eclipse UserFriend
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 03:40 Go to previous messageGo to next message
Eclipse UserFriend
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 03:47 Go to previous messageGo to next message
Eclipse UserFriend
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 03:44 Go to previous messageGo to next message
Eclipse UserFriend
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 04:53 Go to previous message
Eclipse UserFriend
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: Fri Jun 20 07:41:51 EDT 2025

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

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

Back to the top