Package org.jfree.util

Examples of org.jfree.util.Configuration


  }

  public static void printDirectly(final ReportJob report)
      throws PrinterException
  {
    final Configuration reportConfiguration = report.getConfiguration();
    final String jobName = reportConfiguration.getConfigProperty
        (PRINTER_JOB_NAME_KEY, "JFreeReport");

    final PrinterJob printerJob = PrinterJob.getPrinterJob();
    printerJob.setJobName(jobName);
    printerJob.setPageable(new PrintReportProcessor(report));
View Full Code Here


  }

  public static boolean print(final ReportJob report)
      throws PrinterException
  {
    final Configuration reportConfiguration = report.getConfiguration();
    final String jobName = reportConfiguration.getConfigProperty
        (PRINTER_JOB_NAME_KEY, "JFreeReport");

    final PrintReportProcessor document = new PrintReportProcessor(report);

    final PrinterJob printerJob = PrinterJob.getPrinterJob();
View Full Code Here

    {
      throw new NullPointerException();
    }
    this.connectionProvider = connectionProvider;
    this.preparedStatements = new HashMap();
    final Configuration globalConfig =
            JFreeReportBoot.getInstance().getGlobalConfig();
    this.labelMapping = "Label".equals(globalConfig.getConfigProperty
        (SimpleSQLReportDataFactory.COLUMN_NAME_MAPPING_KEY, "Label"));
  }
View Full Code Here

  public static synchronized ConnectionReadHandlerFactory getInstance()
  {
    if (readHandlerFactory == null)
    {
      readHandlerFactory = new ConnectionReadHandlerFactory();
      final Configuration config = JFreeReportBoot.getInstance().getGlobalConfig();
      final Iterator propertyKeys = config.findPropertyKeys(PREFIX_SELECTOR);
      while (propertyKeys.hasNext())
      {
        final String key = (String) propertyKeys.next();
        final String value = config.getConfigProperty(key);
        if (value != null)
        {
          readHandlerFactory.configure(config, value);
        }
      }
View Full Code Here

    {
      throw new NullPointerException();
    }
    this.job = job;

    final Configuration config = job.getConfiguration();
    dataDirectory = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.zip.DataDirectory");
    final String targetFileName = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.zip.TargetFileName");
    exportMethod = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.zip.ExportMethod");
    encoding = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.zip.Encoding", "ASCII");

    targetFile = new File(targetFileName);
    filename = IOUtils.getInstance().stripFileExtension(targetFile.getName());
View Full Code Here

    if (job == null)
    {
      throw new NullPointerException();
    }
    this.job = job;
    final Configuration config = job.getConfiguration();
    final String targetFileName = config.getConfigProperty("org.jfree.report.modules.gui.common.pdf.TargetFileName");

    targetFile = new File(targetFileName);
    if (targetFile.exists())
    {
      if (targetFile.delete())
View Full Code Here

    {
      throw new NullPointerException();
    }
    this.job = job;

    final Configuration config = job.getConfiguration();
    final String dataDirectoryName = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.file.DataDirectory");
    final String targetFileName = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.file.TargetFileName");
    exportMethod = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.file.ExportMethod");
    encoding = config.getConfigProperty
        ("org.jfree.report.modules.gui.common.html.file.Encoding", "ASCII");

    final File targetFile = new File(targetFileName);
    targetDirectory = targetFile.getParentFile();
View Full Code Here

    knownCounters = new HashMap();
  }

  public void registerDefaults ()
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final Iterator it = config.findPropertyKeys(PREFIX);
    while (it.hasNext())
    {
      final String key = (String) it.next();
      final String counterClass = config.getConfigProperty(key);
      if (counterClass == null)
      {
        continue;
      }
      final Object o = ObjectUtilities.loadAndInstantiate
View Full Code Here

    final FormValidator formValidator = getFormValidator();
    formValidator.setEnabled(false);
    final ModifiableConfiguration repConf = reportJob.getConfiguration();
    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);
    setVisible(true);
    if (isConfirmed() == false)
    {
      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

        reportJob.getName() + getConfigurationSuffix());

    try
    {
      final boolean fullStorageEnabled = isFullInputStorageEnabled(reportConfiguration);
      final Configuration dialogContents = grabDialogContents(fullStorageEnabled);
      final ConfigStorage storage = ConfigFactory.getInstance().getUserStorage();
      storage.store(configPath, dialogContents);
    }
    catch (ConfigStoreException cse)
    {
View Full Code Here

TOP

Related Classes of org.jfree.util.Configuration

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.