Package org.jfree.report

Examples of org.jfree.report.JFreeReport


    {
      throw new ParseException
              ("Required element 'query' is missing.", getLocator());
    }
    super.doneParsing();
    JFreeReport report = (JFreeReport) getElement();
    report.setQuery(queryReadHandler.getResult());
    if (propertiesReadHandler != null)
    {
      final Properties p = propertiesReadHandler.getResult();
      final Iterator entries = p.entrySet().iterator();
      while (entries.hasNext())
      {
        Map.Entry entry = (Map.Entry) entries.next();
        report.getEditableConfiguration().setConfigProperty
                ((String) entry.getKey(), (String) entry.getValue());
      }
    }
    if (datasourceFactoryReadHandler != null)
    {
      report.setDataFactory(datasourceFactoryReadHandler.getDataFactory());
    }
    for (int i = 0; i < styleSheetReadHandlers.size(); i++)
    {
      StyleSheetReadHandler handler = (StyleSheetReadHandler)
              styleSheetReadHandlers.get(i);
      report.addStyleSheet(handler.getStyleSheet());
    }
  }
View Full Code Here


                                final ResourceManager manager,
                                final ResourceData data,
                                final ResourceKey context)
          throws ResourceCreationException, ResourceLoadingException
  {
    final JFreeReport report = (JFreeReport) res;
    if (report == null)
    {
      throw new ResourceCreationException("Report has not been parsed.");
    }
    if (context != null)
    {
      report.setBaseResource(context);
    }
    else
    {
      report.setBaseResource(data.getKey());
    }
    report.setResourceManager(manager);

    return report;
  }
View Full Code Here

   * arbitary values and should not be confused with the ones provided by the
   * XMLparser itself.
   */
  public ReportReadHandler()
  {
    report = new JFreeReport();
    styleSheetReadHandlers = new ArrayList();
  }
View Full Code Here

    {
      throw new ParseException
              ("Required element 'query' is missing.", getLocator());
    }
    super.doneParsing();
    final JFreeReport report = (JFreeReport) getElement();
    report.setQuery(queryReadHandler.getResult());
    if (propertiesReadHandler != null)
    {
      final Properties p = propertiesReadHandler.getResult();
      final Iterator entries = p.entrySet().iterator();
      while (entries.hasNext())
      {
        final Map.Entry entry = (Map.Entry) entries.next();
        report.getEditableConfiguration().setConfigProperty
                ((String) entry.getKey(), (String) entry.getValue());
      }
    }
    if (datasourceFactoryReadHandler != null)
    {
      report.setDataFactory(datasourceFactoryReadHandler.getDataFactory());
    }
    for (int i = 0; i < styleSheetReadHandlers.size(); i++)
    {
      final StyleSheetReadHandler handler = (StyleSheetReadHandler)
              styleSheetReadHandlers.get(i);
      report.addStyleSheet(handler.getStyleSheet());
    }
  }
View Full Code Here

  protected FlowController startData(final ReportTarget target,
                                     final FlowController fc)
      throws DataSourceException,
      ReportProcessingException, ReportDataFactoryException
  {
    final JFreeReport report = (JFreeReport) getElement();
    target.startReport(report);
    return fc.performQuery(report.getQuery());
  }
View Full Code Here

  protected FlowController finishData(final ReportTarget target,
                                      final FlowController fc)
      throws DataSourceException, ReportProcessingException
  {
    final JFreeReport report = (JFreeReport) getElement();
    target.endReport(report);
    // do something fancy ... query the data, for instance.
    // this implies that we create a new global datarow.
    return fc.performReturnFromQuery();
  }
View Full Code Here

        feed.endMetaNode();
      }

      if (report instanceof JFreeReport)
      {
        final JFreeReport realReport = (JFreeReport) report;
        final int size = realReport.getStyleSheetCount();
        for (int i = 0; i < size; i++)
        {
          final StyleSheet styleSheet = realReport.getStyleSheet(i);
          feed.startMetaNode();
          feed.setMetaNodeAttribute("type", "style");
          feed.setMetaNodeAttribute("#content", styleSheet);
          feed.endMetaNode();
        }
View Full Code Here

  protected FlowController startData(final ReportTarget target,
                                     final FlowController fc)
      throws DataSourceException,
      ReportProcessingException, ReportDataFactoryException
  {
    final JFreeReport report = (JFreeReport) getElement();
    target.startReport(report);
    return fc.performQuery(report.getQuery());
  }
View Full Code Here

  protected FlowController finishData(final ReportTarget target,
                                      final FlowController fc)
      throws DataSourceException, ReportProcessingException
  {
    final JFreeReport report = (JFreeReport) getElement();
    target.endReport(report);
    // do something fancy ... query the data, for instance.
    // this implies that we create a new global datarow.
    return fc.performReturnFromQuery();
  }
View Full Code Here

        feed.endMetaNode();
      }

      if (report instanceof JFreeReport)
      {
        final JFreeReport realReport = (JFreeReport) report;
        final int size = realReport.getStyleSheetCount();
        for (int i = 0; i < size; i++)
        {
          final StyleSheet styleSheet = realReport.getStyleSheet(i);
          feed.startMetaNode();
          feed.setMetaNodeAttribute("type", "style");
          feed.setMetaNodeAttribute("#content", styleSheet);
          feed.endMetaNode();
        }
View Full Code Here

TOP

Related Classes of org.jfree.report.JFreeReport

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.