Ejemplo n.º 1
0
 @Override
 public void doFOPPublish(FOUserAgent foUserAgent) {
   AWTRenderer renderer = new AWTRenderer();
   renderer.setPreviewDialogDisplayed(true);
   foUserAgent.setRendererOverride(renderer);
   renderer.setUserAgent(foUserAgent);
 }
Ejemplo n.º 2
0
 @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());
   }
 }
Ejemplo n.º 3
0
    @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$
      }
    }