Package org.jfree.base.config

Examples of org.jfree.base.config.ModifiableConfiguration


     */
    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 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.file.";
  }

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

    return conf;
  }
View Full Code Here

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

  protected Configuration grabDialogContents(final boolean full)
  {
    final 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

    clear();
    initializeFromJob(reportJob, guiContext);

    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

      final InputStream in = new BufferedInputStream(new FileInputStream(
              target));
      properties.load(in);
      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

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

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

    return conf;
  }
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 getConfigProperties ()
    {
      if (wrappedConfiguration instanceof ModifiableConfiguration)
      {
        final ModifiableConfiguration modConfiguration =
                (ModifiableConfiguration) wrappedConfiguration;
        return modConfiguration.getConfigProperties();
      }
      return super.getConfigProperties();
    }
View Full Code Here

      final InputStream in = new BufferedInputStream(new FileInputStream(
              target));
      properties.load(in);
      in.close();

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

TOP

Related Classes of org.jfree.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.