Package org.pentaho.reporting.libraries.base.config

Examples of org.pentaho.reporting.libraries.base.config.ModifiableConfiguration


    localFontRegistry.initialize();
  }

  protected MasterReport tuneForTesting(final MasterReport report) throws Exception
  {
    final ModifiableConfiguration configuration = report.getReportConfiguration();
    configuration.setConfigProperty
        (DefaultReportEnvironment.ENVIRONMENT_KEY + "::internal::report.date", "2011-04-07T15:00:00.000+0000");
    configuration.setConfigProperty
        (DefaultReportEnvironment.ENVIRONMENT_TYPE + "::internal::report.date", "java.util.Date");
    return report;
  }
View Full Code Here


  }

  public static void printDirectly(final MasterReport report, final ReportProgressListener progressListener)
      throws PrinterException, ReportProcessingException
  {
    final ModifiableConfiguration reportConfiguration = report.getReportConfiguration();
    final String jobName = reportConfiguration.getConfigProperty
        (PRINTER_JOB_NAME_KEY, report.getTitle());

    final PrinterJob printerJob = PrinterJob.getPrinterJob();
    if (jobName != null)
    {
View Full Code Here

  }

  public static boolean print(final MasterReport report, final ReportProgressListener progressListener)
      throws PrinterException, ReportProcessingException
  {
    final ModifiableConfiguration reportConfiguration = report.getReportConfiguration();
    final String jobName = reportConfiguration.getConfigProperty(PRINTER_JOB_NAME_KEY, report.getTitle());

    final PrinterJob printerJob = PrinterJob.getPrinterJob();
    if (jobName != null)
    {
      printerJob.setJobName(jobName);
View Full Code Here

   * @param full
   * @return
   */
  protected Configuration grabDialogContents(final boolean full)
  {
    final ModifiableConfiguration config = new DefaultConfiguration();
    config.setConfigProperty(CSVProcessor.CSV_SEPARATOR, getSeparatorString());
    config.setConfigProperty(CSVTableModule.SEPARATOR, getSeparatorString());
    config.setConfigProperty(CSVTableModule.STRICT_LAYOUT + ".StrictLayout", //$NON-NLS-1$
        String.valueOf(isStrictLayout()));
    config.setConfigProperty(CSVTableModule.ENCODING, getEncoding());

    config.setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.csv.FileName", getFilename()); //$NON-NLS-1$
    config.setConfigProperty(CSVProcessor.CSV_WRITE_STATECOLUMNS, "false"); //$NON-NLS-1$

    return config;
  }
View Full Code Here

   * @param full
   * @return
   */
  protected Configuration grabDialogContents(final boolean full)
  {
    final ModifiableConfiguration config = new DefaultConfiguration();
    config.setConfigProperty(CSVProcessor.CSV_SEPARATOR, getSeparatorString());
    config.setConfigProperty(CSVProcessor.CSV_DATAROWNAME, String.valueOf(isColumnNamesAsFirstRow()));
    config.setConfigProperty(CSVProcessor.CSV_ENCODING, getEncoding());

    config.setConfigProperty(CSVProcessor.CSV_ENABLE_GROUPFOOTERS, String.valueOf(isEnableGroupFooter()));
    config.setConfigProperty(CSVProcessor.CSV_ENABLE_GROUPHEADERS, String.valueOf(isEnableGroupHeader()));
    config.setConfigProperty(CSVProcessor.CSV_ENABLE_ITEMBANDS, String.valueOf(isEnableItembands()));
    config.setConfigProperty(CSVProcessor.CSV_ENABLE_REPORTFOOTER, String.valueOf(isEnableReportFooter()));
    config.setConfigProperty(CSVProcessor.CSV_ENABLE_REPORTHEADER, String.valueOf(isEnableReportHeader()));

    config.setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.gui.csv.FileName", getFilename()); //$NON-NLS-1$
    config.setConfigProperty(CSVProcessor.CSV_WRITE_STATECOLUMNS, "false"); //$NON-NLS-1$

    return config;
  }
View Full Code Here

      finally
      {
        in.close();
      }

      final ModifiableConfiguration config = new HierarchicalConfiguration(defaults);
      final Iterator keys = properties.keySet().iterator();
      while (keys.hasNext())
      {
        final String key = (String) keys.next();
        config.setConfigProperty(key, properties.getProperty(key));
      }
      return config;
    }
    catch (Exception e)
    {
View Full Code Here

    initializeFromJob(reportJob, guiContext);
    createParametersPanelContent();

    final FormValidator formValidator = getFormValidator();
    formValidator.setEnabled(false);
    final ModifiableConfiguration repConf = reportJob.getReportConfiguration();
    final boolean inputStorageEnabled = isInputStorageEnabled(repConf);

    final Configuration loadedConfiguration;
    if (inputStorageEnabled)
    {
      loadedConfiguration = loadFromConfigStore(reportJob, repConf);
    }
    else
    {
      loadedConfiguration = repConf;
    }

    setDialogContents(loadedConfiguration);

    formValidator.setEnabled(true);
    formValidator.handleValidate();
    setModal(true);
    LibSwingUtil.centerDialogInParent(this);
    setVisible(true);
    if (isConfirmed() == false)
    {
      this.guiContext = defaultContext;
      return false;
    }

    formValidator.setEnabled(false);

    final Configuration fullDialogContents = grabDialogContents(true);
    final Enumeration configProperties =
        fullDialogContents.getConfigProperties();
    while (configProperties.hasMoreElements())
    {
      final String key = (String) configProperties.nextElement();
      repConf.setConfigProperty(key, fullDialogContents.getConfigProperty(key));
    }

    if (inputStorageEnabled)
    {
      saveToConfigStore(reportJob, repConf);
View Full Code Here

     */
    public void setConfigProperty(final String key, final String value)
    {
      if (wrappedConfiguration instanceof ModifiableConfiguration)
      {
        final ModifiableConfiguration modConfiguration =
            (ModifiableConfiguration) wrappedConfiguration;
        modConfiguration.setConfigProperty(key, value);
      }
    }
View Full Code Here

     */
    public Enumeration<String> getConfigProperties()
    {
      if (wrappedConfiguration instanceof ModifiableConfiguration)
      {
        final ModifiableConfiguration modConfiguration =
            (ModifiableConfiguration) wrappedConfiguration;
        return modConfiguration.getConfigProperties();
      }
      return super.getConfigProperties();
    }
View Full Code Here

    return "org.jfree.report.modules.gui.common.html.zip.";
  }

  protected Configuration grabDialogContents(boolean full)
  {
    ModifiableConfiguration conf = new DefaultConfiguration();
    if (full)
    {
      conf.setConfigProperty
          ("org.jfree.report.modules.gui.common.html.zip.TargetFileName", filenameField.getText());
      conf.setConfigProperty
          ("org.jfree.report.modules.gui.common.html.zip.DataDirectory", dataDirField.getText());
    }
    conf.setConfigProperty
        ("org.jfree.report.modules.gui.common.html.zip.ExportMethod", getExportMethod());

    return conf;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.config.ModifiableConfiguration

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.