Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » printing AWT Graphics
printing AWT Graphics [message #464858] Wed, 30 November 2005 13:58
Eclipse User
Originally posted by: ng.felicis.org

Hello together,

I've got an older AWT component within my SWT application that renders an
image that can be printed out. Unfortunately this code starts the Swing
printer dialog and I would like to see the native printing dialog instead.
But I don't know how to translate some portions of the AWT code -- maybe
someone may assist me?

Basically it is this portion:

Toolkit tk = Toolkit.getDefaultToolkit();
PrintJob pj = tk.getPrintJob(new Frame(), "", null);
if (pj != null) {
Graphics g = pj.getGraphics();
this.printProfil(g);
addPrintInfos(g, this.pi[0], this.pi[1], this.pi[2]);
g.dispose();
pj.end();
}

How do I translate the "getGraphics()" Function and the corresponding
"getPrintJob()" to SWT?

Has anybody an idea?

Martin
Previous Topic:How to flash the icon in the Windows taskbar?
Next Topic:TraverseListener
Goto Forum:
  


Current Time: Wed Jul 30 09:28:50 EDT 2014

Powered by FUDForum. Page generated in 0.02050 seconds