Alexander Gavrilov
unread,Apr 3, 2012, 8:03:36 AM4/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWT PaperClips
Hi, I am trying to print nattable, using PaperClips. First of all my
approach was to create an image representation of nattable and then
create an ImagePrint. It works fine, but the problem is that nattable
I our project can be really big, which means that image is also big
and there are a lot of problems with OutOfMemoryError.
Now, I am thinking, that the best solution would be to draw nattable
directly on the gc, which is provided by PaperClips during
PrintPiece#paint. Unfortunately, nattable needs to get rectangle,
which should be drawn, but in PrintPiece#paint method there are only x
and y coordinates (there is information about full nattable width and
height thou).
Is there a way to implement such functionality?
How it would be possible to get width and height of printable area
(considering previous scaling, transformations and so on, which are
done by parent prints, for instance, ScalePrint)?
If someone is familiar with nattable, can you propose some algorithm/
solution of printing nattable?