Search in sources :

Example 1 with JaretTablePrintDialog

use of de.jaret.util.ui.table.print.JaretTablePrintDialog in project translationstudio8 by heartsome.

the class TableControlPanel method print.

public void print() {
    JaretTablePrinter jtp = new JaretTablePrinter(null, _table);
    JaretTablePrintDialog pDialog = new JaretTablePrintDialog(Display.getCurrent().getActiveShell(), null, jtp, null);
    pDialog.open();
    if (pDialog.getReturnCode() == Dialog.OK) {
        PrinterData pdata = pDialog.getPrinterData();
        JaretTablePrintConfiguration conf = pDialog.getConfiguration();
        Printer printer = new Printer(pdata);
        jtp.setPrinter(printer);
        jtp.print(conf);
        printer.dispose();
    }
    jtp.dispose();
}
Also used : JaretTablePrintDialog(de.jaret.util.ui.table.print.JaretTablePrintDialog) PrinterData(org.eclipse.swt.printing.PrinterData) JaretTablePrintConfiguration(de.jaret.util.ui.table.print.JaretTablePrintConfiguration) JaretTablePrinter(de.jaret.util.ui.table.JaretTablePrinter) Printer(org.eclipse.swt.printing.Printer) JaretTablePrinter(de.jaret.util.ui.table.JaretTablePrinter)

Aggregations

JaretTablePrinter (de.jaret.util.ui.table.JaretTablePrinter)1 JaretTablePrintConfiguration (de.jaret.util.ui.table.print.JaretTablePrintConfiguration)1 JaretTablePrintDialog (de.jaret.util.ui.table.print.JaretTablePrintDialog)1 Printer (org.eclipse.swt.printing.Printer)1 PrinterData (org.eclipse.swt.printing.PrinterData)1