Package org.pentaho.reporting.libraries.designtime.swing.background

Examples of org.pentaho.reporting.libraries.designtime.swing.background.DataPreviewDialog$CloseAction


        final Sequence query = sequenceEditor.getSequence();
        if (query == null)
        {
          return;
        }
        final DataPreviewDialog previewDialog = new DataPreviewDialog(SequenceDataSourceEditor.this);
        final SequencePreviewWorker worker = new SequencePreviewWorker(query, designTimeContext);
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(SequenceDataSourceEditor.this,
View Full Code Here


        final KettleDataFactory dataFactory = new KettleDataFactory();
        dataFactory.setQuery(kettleQueryEntry.getName(), fileProducer);

        DataFactoryEditorSupport.configureDataFactoryForPreview(dataFactory, designTimeContext);

        final DataPreviewDialog previewDialog = new DataPreviewDialog(KettleDataSourceDialog.this);

        final KettlePreviewWorker worker = new KettlePreviewWorker(dataFactory, kettleQueryEntry.getName());
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(KettleDataSourceDialog.this,
View Full Code Here

    public void actionPerformed(final ActionEvent evt)
    {
      try
      {
        final DataPreviewDialog previewDialog = new DataPreviewDialog(PmdDataSourceEditor.this);
        final String query = queryNameTextField.getText();
        Integer theMaxRows = 0;
        if (maxPreviewRowsSpinner.isEnabled())
        {
          theMaxRows = (Integer) maxPreviewRowsSpinner.getValue();
        }

        final PmdDataFactory dataFactory = createDataFactory();
        final AbstractReportDefinition report = context.getReport();
        final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
        final Configuration configuration;
        final ResourceKey contentBase;
        final ReportEnvironment reportEnvironment;
        if (masterReport == null)
        {
          contentBase = null;
          configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
          reportEnvironment = new DefaultReportEnvironment(configuration);
        }
        else
        {
          contentBase = masterReport.getContentBase();
          configuration = masterReport.getConfiguration();
          reportEnvironment = masterReport.getReportEnvironment();
        }
        dataFactory.initialize(configuration,
            report.getResourceManager(), contentBase, MasterReport.computeAndInitResourceBundleFactory
            (report.getResourceBundleFactory(), reportEnvironment));

        final PmdPreviewWorker worker = new PmdPreviewWorker(dataFactory, query, 0, theMaxRows);
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(PmdDataSourceEditor.this,
View Full Code Here

        }
        dataFactory.initialize(configuration,
            report.getResourceManager(), contentBase, MasterReport.computeAndInitResourceBundleFactory
                (report.getResourceBundleFactory(), reportEnvironment));

        final DataPreviewDialog previewDialog = new DataPreviewDialog(KettleDataSourceDialog.this);

        final KettlePreviewWorker worker = new KettlePreviewWorker(dataFactory, kettleQueryEntry.getName());
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(KettleDataSourceDialog.this,
View Full Code Here

        {
          theMaxRows = (Integer) maxPreviewRowsSpinner.getValue();
        }
        if (previewDialog == null)
        {
          previewDialog = new DataPreviewDialog(MondrianDataSourceEditor.this);
        }

        final AbstractMDXDataFactory dataFactory = createDataFactory();
        final AbstractReportDefinition report = context.getReport();
        final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
View Full Code Here

        }
        dataFactory.initialize(configuration,
            report.getResourceManager(), contentBase, MasterReport.computeAndInitResourceBundleFactory
                (report.getResourceBundleFactory(), reportEnvironment));

        final DataPreviewDialog previewDialog = new DataPreviewDialog(ScriptableDataSourceEditor.this);

        final ScriptablePreviewWorker worker = new ScriptablePreviewWorker(dataFactory, queryNameTextField.getText());
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(ScriptableDataSourceEditor.this,
View Full Code Here

    public void actionPerformed(final ActionEvent aEvt)
    {
      try
      {
        final String query = queryNameTextField.getText();
        final DataPreviewDialog previewDialog = new DataPreviewDialog(XPathDataSourceEditor.this);
        final XPathDataFactory dataFactory = produceFactory();


        final AbstractReportDefinition report = designTimeContext.getReport();
        final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
        final Configuration configuration;
        final ResourceKey contentBase;
        final ReportEnvironment reportEnvironment;
        if (masterReport == null)
        {
          contentBase = null;
          configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
          reportEnvironment = new DefaultReportEnvironment(configuration);
        }
        else
        {
          contentBase = masterReport.getContentBase();
          configuration = masterReport.getConfiguration();
          reportEnvironment = masterReport.getReportEnvironment();
        }
        dataFactory.initialize(configuration,
            report.getResourceManager(), contentBase, MasterReport.computeAndInitResourceBundleFactory
                (report.getResourceBundleFactory(), reportEnvironment));

        final XPathPreviewWorker worker = new XPathPreviewWorker(dataFactory, query);
        previewDialog.showData(worker);

        final ReportDataFactoryException factoryException = worker.getException();
        if (factoryException != null)
        {
          ExceptionDialog.showExceptionDialog(XPathDataSourceEditor.this,
View Full Code Here

        {
          theMaxRows = (Integer) maxPreviewRowsSpinner.getValue();
        }
        if (previewDialog == null)
        {
          previewDialog = new DataPreviewDialog(Olap4JDataSourceEditor.this);
        }

        final AbstractMDXDataFactory dataFactory = createAndConfigureDataFactory();
        final AbstractReportDefinition report = context.getReport();
        final MasterReport masterReport = DesignTimeUtil.getMasterReport(report);
View Full Code Here

      }

      try
      {
        final String query = getQueryName();
        final DataPreviewDialog dialog = new DataPreviewDialog(JdbcDataSourceDialog.this);
        Integer maxRows = 0;
        if (maxPreviewRowsSpinner.isEnabled())
        {
          maxRows = (Integer) maxPreviewRowsSpinner.getValue();
        }
        if (maxRows == null)
        {
          maxRows = 0;
        }
        final JdbcPreviewWorker theJdbcPreviewWorker = new JdbcPreviewWorker(createDataFactory(connectionDefinition), query, 0, maxRows);
        dialog.showData(theJdbcPreviewWorker);

        final ReportDataFactoryException theException = theJdbcPreviewWorker.getException();
        if (theException != null)
        {
          ExceptionDialog.showExceptionDialog(JdbcDataSourceDialog.this,
View Full Code Here

    public void actionPerformed(final ActionEvent arg0)
    {
      try
      {
        final String query = getQuery();
        final DataPreviewDialog dialog = new DataPreviewDialog(JdbcQueryDesignerDialog.this);
        dialog.showData(new JdbcPreviewWorker(new SimpleSQLReportDataFactory(getConnectionDefinition()), query, 0, 0));
      }
      catch (Exception e)
      {
        log.warn("QueryPanel.actionPerformed ", e);
        if (designTimeContext != null)
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.designtime.swing.background.DataPreviewDialog$CloseAction

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.