Examples of PreviewDialog


Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

  protected void showRelationalGeneratorDialog()
  {
    MasterReport relationalReport = createRelationalReport(createTableModel(),
        "cell", "row-b", "row-a", "column-a", "column-b");
    PreviewDialog dialog = new PreviewDialog(configureReport(relationalReport, false));
    dialog.setModal(true);
    dialog.pack();
    LibSwingUtil.centerFrameOnScreen(dialog);
    dialog.setVisible(true);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

  {
    MasterReport crosstabReport = createCrosstabReport(createTableModel());
    if (crosstabReport == null)
      return;

    PreviewDialog dialog = new PreviewDialog(configureReport(crosstabReport, false));
    dialog.setModal(true);
    dialog.pack();
    LibSwingUtil.centerFrameOnScreen(dialog);
    dialog.setVisible(true);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    if (GraphicsEnvironment.isHeadless())
    {
      return;
    }

    final PreviewDialog previewDialog = new PreviewDialog(report);
    previewDialog.pack();
    previewDialog.setModal(true);
    previewDialog.setVisible(true);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    if (GraphicsEnvironment.isHeadless())
    {
      return;
    }

    final PreviewDialog dialog = new PreviewDialog(report);
    dialog.setModal(true);
    dialog.pack();
    LibSwingUtil.centerFrameOnScreen(dialog);
    dialog.setVisible(true);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    resManager.registerDefaults();

    final Resource directly = resManager.createDirectly(text, MasterReport.class);
    final MasterReport resource = (MasterReport) directly.getResource();

    final PreviewDialog dialog = new PreviewDialog(resource);
    dialog.setModal(true);
    dialog.pack();
    dialog.setVisible(true);
    System.exit(0);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    // parameters already applied)
    Sample3 sample = new Sample3();
    final MasterReport report = sample.getCompleteReportDefinition();

    // Generate the swing preview dialog
    final PreviewDialog dialog = new PreviewDialog();
    dialog.setReportJob(report);
    dialog.setSize(500, 500);
    dialog.setModal(true);
    dialog.setVisible(true);
    System.exit(0);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    final MasterReport reportElement = getActiveContext().getMasterReportElement();

    final Component parent = getReportDesignerContext().getParent();
    final Window window = SwingUtil.getWindowAncestor(parent);
    final PreviewDialog dialog;
    if (window instanceof JDialog)
    {
      dialog = new PreviewDialog((JDialog) window);
    }
    else if (window instanceof JFrame)
    {
      dialog = new PreviewDialog((JFrame) window);
    }
    else
    {
      dialog = new PreviewDialog();
    }

    dialog.addWindowListener(new PreviewSizeMonitor(reportElement));
    dialog.setReportJob(reportElement);
    dialog.pack();

    final Object attribute = reportElement.getAttribute
        (ReportDesignerBoot.DESIGNER_NAMESPACE, "preview-dialog-bounds");//$NON-NLS-1$
    if (attribute instanceof String)
    {
      final Rectangle rectangle = GUIUtils.parseRectangle(attribute.toString());
      if (rectangle != null)
      {
        if (LibSwingUtil.safeRestoreWindow(dialog, rectangle))
        {
          dialog.setReportJob(reportElement);
          return;
        }
      }
    }

    dialog.setSize(700, 700);
    SwingUtil.centerDialogInParent(dialog);
    dialog.setVisible(true);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    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;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    final boolean modal = getInputBooleanValue( AbstractJFreeReportComponent.REPORTSWING_MODAL, true );

    if ( isDefinedInput( AbstractJFreeReportComponent.REPORTSWING_PARENTDIALOG ) ) {
      final Object parent = getInputValue( AbstractJFreeReportComponent.REPORTSWING_PARENTDIALOG );
      if ( parent instanceof Dialog ) {
        return new PreviewDialog( report, (Dialog) parent, modal );
      } else if ( parent instanceof Frame ) {
        return new PreviewDialog( report, (Frame) parent, modal );
      }
    }

    final PreviewDialog previewDialog = new PreviewDialog( report );
    previewDialog.setModal( modal );
    return previewDialog;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewDialog

    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;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.