Examples of FlowController


Examples of org.jfree.report.flow.FlowController

    final LayoutControllerFactory layoutFactory =
        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);

    try
View Full Code Here

Examples of org.jfree.report.flow.FlowController

      throws DataSourceException, ReportProcessingException,
      ReportDataFactoryException
  {
    final Element s = getElement();

    FlowController fc = getFlowController();
    // Step 3: Add the expressions. Any expressions defined for the subreport
    // will work on the queried dataset.
    fc = startData(target, fc);

    final Expression[] expressions = s.getExpressions();
View Full Code Here

Examples of org.jfree.report.flow.FlowController

   */
  protected LayoutController finishElement(final ReportTarget target)
      throws ReportProcessingException, DataSourceException,
      ReportDataFactoryException
  {
    final FlowController fc = handleDefaultEndElement(target);
    final ElementLayoutController derived = (ElementLayoutController) clone();
    derived.setProcessingState(ElementLayoutController.FINISHED);
    derived.setFlowController(fc);
    return derived;
  }
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    if (e.isVirtual() == false)
    {
      target.endElement(getAttributeMap());
    }

    FlowController fc = getFlowController();
    final PrecomputedValueRegistry pcvr =
        fc.getPrecomputedValueRegistry();
    // Step 2: Remove the expressions of this element
    final int expressionsCount = getExpressionsCount();
    if (expressionsCount != 0)
    {
      final ExpressionSlot[] activeExpressions = fc.getActiveExpressions();
      for (int i = activeExpressions.length - expressionsCount; i < activeExpressions.length; i++)
      {
        final ExpressionSlot slot = activeExpressions[i];
        pcvr.addFunction(slot.getName(), slot.getValue());
      }
      fc = fc.deactivateExpressions();
    }

    if (isPrecomputing() == false)
    {
      pcvr.finishElement(new ElementPrecomputeKey(e));
View Full Code Here

Examples of org.jfree.report.flow.FlowController

      final boolean advanceable = fc.getMasterRow().isAdvanceable();
      if (advanceable && advanceRequested)
      {
        // we check against the commited target; But we will not use the
        // commited target if the group is no longer active...
        final FlowController cfc =
            fc.performOperation(FlowControlOperation.COMMIT);
        final boolean groupFinished =
            LayoutControllerUtil.isGroupFinished(cfc, getElement());
        if (groupFinished == false)
        {
View Full Code Here

Examples of org.jfree.report.flow.FlowController

  protected LayoutController processContent(final ReportTarget target)
      throws DataSourceException, ReportProcessingException, ReportDataFactoryException
  {

    final Node node = getElement();
    final FlowController flowController = getFlowController();
    final LayoutExpressionRuntime er =
        LayoutControllerUtil.getExpressionRuntime(flowController, node);
    final ContentElement element = (ContentElement) node;
    final Expression ex = element.getValueExpression();
    final Object value;

    if (ex != null)
    {
      try
      {
        ex.setRuntime(er);
        value = ex.computeValue();
      }
      finally
      {
        ex.setRuntime(null);
      }
    }
    else
    {
      value = null;
    }

    // This should be a very rare case indeed ..
    if (value instanceof DataFlags)
    {
      target.processContent((DataFlags) value);

      final ContentElementLayoutController derived = (ContentElementLayoutController) clone();
      derived.setProcessingState(ElementLayoutController.FINISHING);
      derived.setFlowController(flowController);
      return derived;
    }

    if (value instanceof Node)
    {
      // we explictly allow structural content here.
      // As this might be a very expensive thing, if we
      // keep it in a single state, we continue on a separate state.
      final Node valueNode = (Node) value;
      valueNode.updateParent(node.getParent());
      final ReportContext reportContext = flowController.getReportContext();
      final LayoutControllerFactory layoutControllerFactory =
          reportContext.getLayoutControllerFactory();

      // actually, this is the same as if the element were a
      // child element of a section. The only difference is
View Full Code Here

Examples of org.jfree.report.flow.FlowController

                                         final LayoutController layoutController,
                                         final FlowController flowController)
      throws ReportProcessingException, ReportDataFactoryException,
      DataSourceException
  {
    final FlowController fc = flowController.createPrecomputeInstance();
    final PrecomputedValueRegistry pcvr = fc.getPrecomputedValueRegistry();

    pcvr.startElementPrecomputation(nodeKey);

    final LayoutController rootLc = layoutController.createPrecomputeInstance(fc);
    final LayoutController rootParent = rootLc.getParent();
    final ReportTarget target = new EmptyReportTarget(fc.getReportJob(), fc.getExportDescriptor());

    LayoutController lc = rootLc;
    while (lc.isAdvanceable())
    {
      lc = lc.advance(target);
View Full Code Here

Examples of org.jfree.report.flow.FlowController


  public static LayoutController skipInvisibleElement(final LayoutController layoutController)
      throws ReportProcessingException, ReportDataFactoryException, DataSourceException
  {
    final FlowController fc = layoutController.getFlowController();
    final ReportTarget target = new EmptyReportTarget(fc.getReportJob(), fc.getExportDescriptor());
    final LayoutController rootParent = layoutController.getParent();

    // Now start to iterate until the derived layout controller 'lc' that has this given parent
    // wants to join.
    LayoutController lc = layoutController;
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    }

    if (currentColumn < columnCount)
    {
      // now delegate the processing to the section handler for the header ..
      final FlowController flowController = getFlowController();
      final ReportContext reportContext = flowController.getReportContext();
      final LayoutControllerFactory layoutControllerFactory =
          reportContext.getLayoutControllerFactory();

      final int idx = currentColumn % node.getContentCount();
      final AutoTableLayoutController derived = (AutoTableLayoutController) clone();
      return layoutControllerFactory.create
          (flowController, node.getContentCell(idx), derived);
    }

    // close the table-header section ..
    final AttributeMap elementMap = LayoutControllerUtil.createEmptyMap
        (AutoTableModule.AUTOTABLE_NAMESPACE, "data-row");
    target.endElement(elementMap);

    final FlowController flowController =
        getFlowController().performOperation(FlowControlOperation.ADVANCE);
    final FlowController cfc = tryRepeatingCommit(flowController);
    if (cfc != null)
    {
      // Go back to the beginning. We have made a commit, so the cursor points
      // to the next row of data ..
      final AutoTableLayoutController derived = (AutoTableLayoutController) clone();
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    }

    if (currentColumn < columnCount)
    {
      // now delegate the processing to the section handler for the header ..
      final FlowController flowController = getFlowController();
      final ReportContext reportContext = flowController.getReportContext();
      final LayoutControllerFactory layoutControllerFactory =
          reportContext.getLayoutControllerFactory();

      final int idx = currentColumn % node.getFooterCount();
      final AutoTableLayoutController derived = (AutoTableLayoutController) clone();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.