mPageFormat = printerJob.defaultPage();
}
mFieldTypes = fieldChooser.getOrder();
DocumentRenderer printJob = createPrintjob(program, fontChooser, printImage, printPluginIcons);
PreviewDlg dlg = new PreviewDlg(mDialog, printJob, mPageFormat, printJob.getPageCount());
PrintPlugin.getInstance().layoutWindow("previewDlg",dlg);
dlg.setVisible(true);
}
});
JButton print = new JButton(SettingsDialog.mLocalizer.msg("print","Drucken"));
print.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (mPageFormat == null) {
mPageFormat = printerJob.defaultPage();
}
mFieldTypes = fieldChooser.getOrder();
ProgramInfoPrintSettings.getInstance().setFont(fontChooser.getChosenFont());
ProgramInfoPrintSettings.getInstance().setFieldTypes(mFieldTypes);
ProgramInfoPrintSettings.getInstance().setPrintImage(printImage.isSelected());
ProgramInfoPrintSettings.getInstance().setPrintPluginIcons(printPluginIcons.isSelected());
close();
DocumentRenderer printable = createPrintjob(program, fontChooser, printImage, printPluginIcons);
printerJob.setPrintable(printable, mPageFormat);
try {
printerJob.print();
} catch (PrinterException pe) {