/** * Creates the progress dialog that monitors the export process. * * @return the progress monitor dialog. */ protected ReportProgressDialog createProgressDialog() { final ReportProgressDialog progressDialog = super.createProgressDialog(); progressDialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); progressDialog.setMessage( resources.getString("excel-export.progressdialog.message")); // $NON-NLS-1$ progressDialog.pack(); LibSwingUtil.positionFrameRandomly(progressDialog); return progressDialog; }
public void attemptPreview() { try { final MasterReport report = handler.createReport(); final PreviewDialog frame = new PreviewDialog(report); frame.setToolbarFloatable(true); frame.setReportController(new DemoReportController()); frame.pack(); LibSwingUtil.positionFrameRandomly(frame); frame.setVisible(true); frame.requestFocus(); } catch (ReportDefinitionException e) { logger.error("Unable to create the report; report definition contained errors.", e); AbstractDemoFrame.showExceptionDialog( handler.getPresentationComponent(), "report.definitionfailure", e); } }