Package org.jfree.util

Examples of org.jfree.util.Configuration


  }


  public void registerDefaults()
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final Iterator sit = config.findPropertyKeys(SIMPLE_PREFIX);
    while (sit.hasNext())
    {
      final String key = (String) sit.next();
      final String name = key.substring(SIMPLE_PREFIX.length()).toLowerCase();
      final String c = config.getConfigProperty(key);
      final Object module =
              ObjectUtilities.loadAndInstantiate(c, CSSValueFactory.class, CSSValueReadHandler.class);
      if (module instanceof CSSValueReadHandler)
      {
        handlers.put(name, module);
      }
      else
      {
        Log.warn("Invalid module implementation: " + c);
      }
    }

    final Iterator cit = config.findPropertyKeys(COMPOUND_PREFIX);
    while (cit.hasNext())
    {
      final String key = (String) cit.next();
      final String name = key.substring(COMPOUND_PREFIX.length()).toLowerCase();
      final String c = config.getConfigProperty(key);
      final Object module =
              ObjectUtilities.loadAndInstantiate(c, CSSValueFactory.class, CSSCompoundValueReadHandler.class);
      if (module instanceof CSSCompoundValueReadHandler)
      {
        compoundHandlers.put(name, module);
View Full Code Here


  }

  public Parser createCSSParser ()
          throws CSSParserInstantiationException
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final String parserClass =
            config.getConfigProperty("org.jfree.layouting.css.Parser");
    if (parserClass != null)
    {
      final Parser p = (Parser) ObjectUtilities.loadAndInstantiate
            (parserClass, CSSParserFactory.class, Parser.class);
      if (p != null)
View Full Code Here

   */
  public boolean performShowExportDialog(ReportJob job, String configKey)
  {
    try
    {
      final Configuration configuration = job.getConfiguration();
      final String dialogClassName = configuration.getConfigProperty(configKey);
      final ExportDialog dialog = createExportDialog(dialogClassName);
      final boolean dialogResult = dialog.performQueryForExport(job, getContext());
      return dialogResult;
    }
    catch (InstantiationException e)
View Full Code Here

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

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

  }

  public void initialize (final ReportJob job)
  {
    final Configuration configuration = job.getConfiguration();

    final Iterator propertyKeys =
        configuration.findPropertyKeys(DefaultLayoutControllerFactory.PREFIX);
    while (propertyKeys.hasNext())
    {
      final String key = (String) propertyKeys.next();
      final String nodeClassName = key.substring
          (DefaultLayoutControllerFactory.PREFIX.length());
      final String procClassName = configuration.getConfigProperty(key);

      final Class nodeClass = load(nodeClassName);
      final Object processor = ObjectUtilities.loadAndInstantiate
          (procClassName, DefaultLayoutControllerFactory.class, LayoutController.class);
      if (nodeClass == null || processor == null)
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

  }

  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.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

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.