Package org.pentaho.reporting.engine.classic.core.modules.gui.base

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


  public static void main(String[] args)
      throws ReportDefinitionException
  {
    ClassicEngineBoot.getInstance().start();
    PaddingTestHandler handler = new PaddingTestHandler();
    PreviewDialog dialog = new PreviewDialog(handler.createReport());
    dialog.setSize(600, 700);
    dialog.setModal(true);
    dialog.setVisible(true);
    System.exit(0);
  }
View Full Code Here


  public static void main(String[] args)
      throws ReportDefinitionException
  {
    ClassicEngineBoot.getInstance().start();
    BorderTestHandler handler = new BorderTestHandler();
    PreviewDialog dialog = new PreviewDialog(handler.createReport());
    dialog.setSize(600, 700);
    dialog.setModal(true);
    dialog.setVisible(true);
    System.exit(0);
  }
View Full Code Here

  {
    try
    {
      final MasterReport report = handler.createReport();

      final PreviewDialog frame = new PreviewDialog(report);
      frame.setToolbarFloatable(true);
      frame.setReportController(new LocaleSelectionReportController());
      frame.pack();
      SwingUtil.positionFrameRandomly(frame);
      frame.setVisible(true);
      frame.requestFocus();
    }
    catch (ReportDefinitionException e)
    {
      AbstractDemoFrame.showExceptionDialog(handler.getPresentationComponent(), "report.definitionfailure", e);
    }
View Full Code Here

  private static void showReport(MasterReport report, JFrame mainAppWindow)
      throws Exception
  {
    // 0.8.9.4
    PreviewDialog preview = new PreviewDialog(report, mainAppWindow, true);
    DefaultReportController demo = new DefaultReportController();
    preview.setReportController(demo);
    preview.setReportJob(report);

    // // 0.8.8-01
    // PreviewDialog preview = new PreviewDialog(report, mainAppWindow,
    // true);
    // DefaultReportControler demo = new DefaultReportControler();
    // preview.getBase().setReportControler(demo);

    // Both
    preview.pack();
    preview.setSize(new Dimension(PRINT_DIALOG_WIDTH, PRINT_DIALOG_HEIGHT));
    RefineryUtilities.centerFrameOnScreen(preview);
    preview.setVisible(true);
  }
View Full Code Here

  public static void main(String[] args) throws ReportDefinitionException
  {
    ClassicEngineBoot.getInstance().start();
    SimpleInvoiceDemoHandler handler = new SimpleInvoiceDemoHandler();
    final MasterReport report = handler.createReport();
    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

  {
    try
    {
      final MasterReport report = handler.createReport();

      final PreviewDialog frame = new PreviewDialog(report);
      frame.setToolbarFloatable(true);
      frame.setReportController(new DemoReportController());
      frame.pack();
      SwingUtil.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);
View Full Code Here

      tableModel.addComponent(frame);
      report.setDataFactory(new TableDataFactory("default", tableModel));

      // Important: The dialog must be modal, so that we know, when the report
      // processing is finished.
      final PreviewDialog previewDialog = new PreviewDialog(report, this, true);
      previewDialog.setToolbarFloatable(true);
      previewDialog.pack();
      SwingUtil.positionFrameRandomly(previewDialog);
      previewDialog.setVisible(true);
    }
    catch (Exception e)
    {
      logger.error("Failed to parse the report definition", e);
    }
View Full Code Here

  }

  public void preview()
  {
    // At some point some parts of this should probably be XULified
    final PreviewDialog dialog;
    if (designTimeContext != null)
    {
      final Window window = designTimeContext.getParentWindow();
      if (window instanceof Dialog)
      {
        dialog = new PreviewDialog((Dialog) window);
      }
      else if (window instanceof Frame)
      {
        dialog = new PreviewDialog((Frame) window);
      }
      else
      {
        dialog = new PreviewDialog();
      }
    }
    else
    {
      dialog = new PreviewDialog();
    }

    dialog.setTitle(messages.getString("LINEAR_WIZARD_CONTROLLER.Report_Preview"));
    dialog.setModal(false);

    try
    {
      final AbstractReportDefinition reportDefinition = editorModel.getReportDefinition();
      final AbstractReportDefinition element = (AbstractReportDefinition) reportDefinition.derive();
      final WizardSpecification spec = editorModel.getReportSpec();
      element.setAttribute(AttributeNames.Wizard.NAMESPACE, "enable", Boolean.TRUE);
      WizardProcessorUtil.applyWizardSpec(element, (WizardSpecification) spec.clone());
      WizardProcessorUtil.ensureWizardProcessorIsAdded(element, null);

      if (element instanceof MasterReport)
      {
        dialog.setReportJob((MasterReport) element);
      }
      else
      {
        final MasterReport report = new MasterReport();
        report.getReportHeader().addSubReport((SubReport) element);
        dialog.setReportJob(report);
      }
      dialog.pack();
      SwingUtil.centerDialogInParent(dialog);
      dialog.setVisible(true);
    }
    catch (Exception e)
    {
      if (designTimeContext != null)
      {
View Full Code Here

    final BookstoreDemo handler = new BookstoreDemo();

//    HtmlReportUtil.createDirectoryHTML(handler.createReport(), "/tmp/report.html");
//    ExcelReportUtil.createXLS(handler.createReport(), "/tmp/report.xls");
    final MasterReport report = handler.createReport();
    final PreviewDialog dialog = new PreviewDialog();
    dialog.setReportJob(report);
    dialog.setSize(500, 500);
    dialog.setModal(true);
    dialog.setVisible(true);
    System.exit(0);
//
//    final SimpleDemoFrame frame = new SimpleDemoFrame(handler);
//    frame.init();
//    frame.pack();
View Full Code Here

  {
    // initialize JFreeReport
    ClassicEngineBoot.getInstance().start();

    final FontDemo handler = new FontDemo();
    PreviewDialog dialog = new PreviewDialog(handler.createReport());
    dialog.setSize(500, 300);
    dialog.setModal(true);
    dialog.setVisible(true);
    System.exit(0);
//    PdfReportUtil.createPDF(handler.createReport(), "/tmp/exporte.pdf");

//    final SimpleDemoFrame frame = new SimpleDemoFrame(handler);
//    frame.init();
View Full Code Here

TOP

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

Copyright © 2018 www.massapicom. 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.