Package org.jfree.report.flow.layoutprocessor

Examples of org.jfree.report.flow.layoutprocessor.LayoutController


          context.getLayoutControllerFactory();
      // we have the data and we have our position inside the report.
      // lets generate something ...
      final FlowController flowController = createFlowControler(context, job);

      LayoutController layoutController =
          layoutFactory.create(flowController, job.getReportStructureRoot(), null);

      while (layoutController.isAdvanceable())
      {
        layoutController = layoutController.advance(target);
        while (layoutController.isAdvanceable() == false &&
               layoutController.getParent() != null)
        {
          final LayoutController parent = layoutController.getParent();
          target.commit();
          layoutController = parent.join(layoutController.getFlowController());
        }
      }
      target.commit();
    }
  }
View Full Code Here


    // we have the data and we have our position inside the report.
    // lets generate something ...
    final FlowController flowController = createFlowControler(context, job);

    LayoutController layoutController =
        layoutFactory.create(flowController, job.getReportStructureRoot(), null);

    try
    {
      stateList.add(new PageState(target.saveState(), layoutController,
          outputProcessor.getPageCursor()));
      int logPageCount = outputProcessor.getLogicalPageCount();
      int physPageCount = outputProcessor.getPhysicalPageCount();

      while (layoutController.isAdvanceable())
      {
        layoutController = layoutController.advance(target);
        target.commit();

        while (layoutController.isAdvanceable() == false &&
               layoutController.getParent() != null)
        {
          final LayoutController parent = layoutController.getParent();
          layoutController = parent.join(layoutController.getFlowController());
        }

        // check whether a pagebreak has been encountered.
        if (target.isPagebreakEncountered())
        {
View Full Code Here

    final ReportTargetState targetState = previousState.getTargetState();
    final LibLayoutReportTarget target =
        (LibLayoutReportTarget) targetState.restore(outputProcessor);
    outputProcessor.setPageCursor(previousState.getPageCursor());

    LayoutController position = previousState.getLayoutController();

    // we have the data and we have our position inside the report.
    // lets generate something ...

    while (position.isAdvanceable())
    {
      position = position.advance(target);
      target.commit();

      // else check whether this state is finished, and try to join the subflow
      // with the parent.
      while (position.isAdvanceable() == false &&
             position.getParent() != null)
      {
        final LayoutController parent = position.getParent();
        position = parent.join(position.getFlowController());
      }

      // check whether a pagebreak has been encountered.
      if (target.isPagebreakEncountered())
      {
View Full Code Here

  }

  private String computeVariablesPrefix()
  {
    int count = 0;
    LayoutController lc = this;
    while (lc != null)
    {
      if (lc instanceof OfficeGroupLayoutController)
      {
        count += 1;
      }
      lc = lc.getParent();
    }
    return "auto_group_" + count + "_";
  }
View Full Code Here

    if (section.isRepeatSection() == false)
    {
      return super.startElement(target);
    }

    final LayoutController controller = getParent();
    if (controller instanceof OfficeGroupLayoutController == false)
    {
      return super.startElement(target);
    }
    final OfficeGroupLayoutController oglc = (OfficeGroupLayoutController) controller;
View Full Code Here

                                           final Element element,
                                           final ReportTarget target)
      throws DataSourceException
  {
    final AttributeMap attrs = super.computeAttributes(fc, element, target);
    final LayoutController controller = getParent();
    if (controller instanceof OfficeGroupLayoutController == false)
    {
      return attrs;
    }
    final OfficeGroupLayoutController oglc = (OfficeGroupLayoutController) controller;
View Full Code Here

  {
  }

  private VariablesCollection getVariablesCollection()
  {
    LayoutController parent = getParent();
    while (parent != null)
    {
      if (parent instanceof OfficeRepeatingStructureLayoutController)
      {
        final OfficeRepeatingStructureLayoutController orslc =
            (OfficeRepeatingStructureLayoutController) parent;
        if (orslc.isNormalFlowProcessing())
        {
          return null;
        }

        return orslc.getVariablesCollection();
      }
      parent = parent.getParent();
    }
    return null;
  }
View Full Code Here

    return join(getFlowController());
  }

  private Element getParentTableCell()
  {
    LayoutController parent = getParent();
    while (parent != null)
    {
      if (parent instanceof TableCellLayoutController)
      {
        final TableCellLayoutController cellController = (TableCellLayoutController) parent;
        return cellController.getElement();
      }
      parent = parent.getParent();
    }
    return null;
  }
View Full Code Here

    return slc.getIterationCount() == 0;
  }

  private SectionLayoutController findGroup()
  {
    LayoutController parent = getParent();
    boolean skipNext = false;
    while (parent != null)
    {
      if (parent instanceof SectionLayoutController == false)
      {
        parent = parent.getParent();
        continue;
      }

      final SectionLayoutController slc = (SectionLayoutController) parent;
      final Element element = slc.getElement();
      if (element instanceof OfficeGroupSection)
      {
        // This is a header or footer. So we take the next group instead.
        skipNext = true;
        parent = parent.getParent();
        continue;
      }

      if (element instanceof Group == false)
      {
        parent = parent.getParent();
        continue;
      }

      if (skipNext)
      {
        skipNext = false;
        parent = parent.getParent();
        continue;
      }

      return (SectionLayoutController) parent;
    }
View Full Code Here

    {
    }

    private OfficeRepeatingStructureLayoutController getRepeatingParent()
    {
        LayoutController parent = getParent();
        while (parent != null)
        {
            if (parent instanceof OfficeRepeatingStructureLayoutController)
            {
                return (OfficeRepeatingStructureLayoutController) parent;
            }
            parent = parent.getParent();
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jfree.report.flow.layoutprocessor.LayoutController

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.