Search in sources :

Example 1 with ReportController

use of org.pentaho.reporting.engine.classic.core.modules.gui.base.ReportController in project pentaho-platform by pentaho.

the class JFreeReportPreviewSwingComponent method performExport.

@Override
protected boolean performExport(final MasterReport report) {
    final ModifiableConfiguration reportConfiguration = report.getReportConfiguration();
    final boolean progressBar = getInputBooleanValue(AbstractJFreeReportComponent.REPORTSWING_PROGRESSBAR, "true".equals(reportConfiguration.getConfigProperty(// $NON-NLS-1$
    JFreeReportPreviewSwingComponent.PROGRESS_BAR_ENABLED_KEY)));
    final boolean progressDialog = getInputBooleanValue(AbstractJFreeReportComponent.REPORTSWING_PROGRESSDIALOG, "true".equals(reportConfiguration.getConfigProperty(// $NON-NLS-1$
    JFreeReportPreviewSwingComponent.PROGRESS_DIALOG_ENABLED_KEY)));
    reportConfiguration.setConfigProperty(JFreeReportPreviewSwingComponent.PROGRESS_DIALOG_ENABLED_KEY, String.valueOf(progressDialog));
    reportConfiguration.setConfigProperty(JFreeReportPreviewSwingComponent.PROGRESS_BAR_ENABLED_KEY, String.valueOf(progressBar));
    final PreviewDialog dialog = createDialog(report);
    final ReportController reportController = getReportController();
    if (reportController != null) {
        dialog.setReportController(reportController);
    }
    dialog.pack();
    if (dialog.getParent() != null) {
        RefineryUtilities.centerDialogInParent(dialog);
    } else {
        RefineryUtilities.centerFrameOnScreen(dialog);
    }
    dialog.setVisible(true);
    return true;
}
Also used : ModifiableConfiguration(org.pentaho.reporting.libraries.base.config.ModifiableConfiguration) ReportController(org.pentaho.reporting.engine.classic.core.modules.gui.base.ReportController) PreviewDialog(org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog)

Example 2 with ReportController

use of org.pentaho.reporting.engine.classic.core.modules.gui.base.ReportController in project pentaho-platform by pentaho.

the class JFreeReportComponent method writeSwingPreview.

protected boolean writeSwingPreview(final MasterReport report) {
    final ModifiableConfiguration reportConfiguration = report.getReportConfiguration();
    final boolean progressBar = getInputBooleanValue(AbstractJFreeReportComponent.REPORTSWING_PROGRESSBAR, // $NON-NLS-1$
    "true".equals(reportConfiguration.getConfigProperty(JFreeReportComponent.PROGRESS_BAR_ENABLED_KEY)));
    final boolean progressDialog = getInputBooleanValue(AbstractJFreeReportComponent.REPORTSWING_PROGRESSDIALOG, // $NON-NLS-1$
    "true".equals(reportConfiguration.getConfigProperty(JFreeReportComponent.PROGRESS_DIALOG_ENABLED_KEY)));
    reportConfiguration.setConfigProperty(JFreeReportComponent.PROGRESS_DIALOG_ENABLED_KEY, String.valueOf(progressDialog));
    reportConfiguration.setConfigProperty(JFreeReportComponent.PROGRESS_BAR_ENABLED_KEY, String.valueOf(progressBar));
    final PreviewDialog dialog = createDialog(report);
    final ReportController reportController = getReportController();
    if (reportController != null) {
        dialog.setReportController(reportController);
    }
    dialog.pack();
    if (dialog.getParent() != null) {
        RefineryUtilities.centerDialogInParent(dialog);
    } else {
        RefineryUtilities.centerFrameOnScreen(dialog);
    }
    dialog.setVisible(true);
    return true;
}
Also used : ModifiableConfiguration(org.pentaho.reporting.libraries.base.config.ModifiableConfiguration) ReportController(org.pentaho.reporting.engine.classic.core.modules.gui.base.ReportController) PreviewDialog(org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog)

Aggregations

PreviewDialog (org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog)2 ReportController (org.pentaho.reporting.engine.classic.core.modules.gui.base.ReportController)2 ModifiableConfiguration (org.pentaho.reporting.libraries.base.config.ModifiableConfiguration)2