@Override public void doFOPPublish(FOUserAgent foUserAgent) { AWTRenderer renderer = new AWTRenderer(); renderer.setPreviewDialogDisplayed(true); foUserAgent.setRendererOverride(renderer); renderer.setUserAgent(foUserAgent); }
@Override protected void done() { progressBar.setIndeterminate(false); sheetBox.setEnabled(true); enableEditGroup(true); try { AWTRenderer renderer = get(); pageable = renderer; setPreviewPanel(new PreviewPanel(renderer.getUserAgent(), null, renderer)); pageBox.setModel(createPagesModel(renderer.getNumberOfPages())); } catch (InterruptedException ex) { Logging.errorPrint("Could not load sheet", ex); } catch (ExecutionException ex) { Logging.errorPrint("Could not load sheet", ex.getCause()); } }
@Override public void stopRenderer() throws IOException { super.stopRenderer(); try { printerJob.print(); } catch (PrinterException e) { e.printStackTrace(); throw new IOException( Messages.getInstance() .getString( "PrintComponent.ERROR_0003_UNABLE_TO_PRINT", e.getClass().getName(), e.getMessage())); // $NON-NLS-1$ } }