Package org.pentaho.reporting.engine.classic.core

Examples of org.pentaho.reporting.engine.classic.core.CrosstabCellBody


    super("crosstab-cell-body", true);
  }

  public ReportElement create()
  {
    return new CrosstabCellBody();
  }
View Full Code Here


      final ItemBand itemBand = element.getItemBand();
      final CrosstabCell cell = new CrosstabCell();
      itemBand.copyInto(cell);
      cell.addElements(Arrays.asList(itemBand.getElementArray()));

      final CrosstabCellBody body = new CrosstabCellBody();
      body.addElement(cell);
      group.setBody(body);
    }
  }
View Full Code Here

    {
      trigger = (!trigger);
    }
    count += 1;

    final CrosstabCellBody cellBody = event.getReport().getCrosstabCellBody();
    if (cellBody == null)
    {
      return;
    }

    if (element == null)
    {
      final int elementCount = cellBody.getElementCount();
      for (int i = 1; i < elementCount; i += 1)
      {
        final Element cell = cellBody.getElement(i);
        if (trigger)
        {
          cell.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, visibleBackground);
        }
        else
View Full Code Here

    if (!crosstabLayout.isGenerateMeasureHeaders())
    {
      return;
    }

    final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
    if (dataBody == null)
    {
      throw new InvalidReportStateException();
    }

    final LayoutModelBuilder layoutModelBuilder = outputFunction.getRenderer().getNormalFlowLayoutModelBuilder();
    layoutModelBuilder.startSubFlow(crosstabLayout.getMeasureHeaderSubflowId());
    CrosstabOutputHelper.createAutomaticCell(layoutModelBuilder);
    outputFunction.getRenderer().add(dataBody.getHeader(), outputFunction.getRuntime());
    layoutModelBuilder.finishBox();
    layoutModelBuilder.suspendSubFlow();
  }
View Full Code Here

  }

  public void itemsAdvanced(final DefaultOutputFunction outputFunction,
                            final ReportEvent event) throws ReportProcessingException
  {
    final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
    if (dataBody == null)
    {
      return;
    }

    final RenderedCrosstabLayout crosstabLayout = outputFunction.getCurrentRenderedCrosstabLayout();
    if (crosstabLayout.isDetailsRendered())
    {
      return;
    }

    final CrosstabCell element = dataBody.findElement(null, null);
    if (element != null)
    {
      final CrosstabDetailMode detailMode = crosstabLayout.getDetailMode();
      if (detailMode == null)
      {
View Full Code Here

                            final ReportEvent event) throws ReportProcessingException
  {
    final RenderedCrosstabLayout crosstabLayout = outputFunction.getCurrentRenderedCrosstabLayout();
    if (CrosstabDetailMode.last.equals(crosstabLayout.getDetailMode()))
    {
      final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
      final CrosstabCell element = dataBody.findElement(null, null);
      if (element != null)
      {
        outputFunction.getRenderer().startSection(Renderer.SectionType.NORMALFLOW);
        outputFunction.getRenderer().add(element, outputFunction.getRuntime());
        outputFunction.addSubReportMarkers(outputFunction.getRenderer().endSection());
View Full Code Here

    if (group.isPrintSummary() == false)
    {
      return;
    }

    final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
    final CrosstabCell element = dataBody.findElement(null, group.getField());
    if (element == null)
    {
      return;
    }

    // handle column summary. This can happen inline, with no new states fired.
    final RenderedCrosstabLayout crosstabLayout = outputFunction.getCurrentRenderedCrosstabLayout();
    final LayoutModelBuilder layoutModelBuilder = outputFunction.getRenderer().getNormalFlowLayoutModelBuilder();

    if (crosstabLayout.isCrosstabHeaderOpen())
    {
      // Expand all parent group cell-spans by one.

      expandColumnHeaderSpan(crosstabLayout, layoutModelBuilder, gidx);

      // and finally print the title-header and the summary header
      if (crosstabLayout.isGenerateColumnTitleHeaders())
      {
        layoutModelBuilder.startSubFlow(crosstabLayout.getColumnTitleHeaderSubflowId(gidx));
        createAutomaticCell(layoutModelBuilder);
        crosstabLayout.setColumnTitleHeaderCellId(gidx - crosstabLayout.getFirstColGroupIndex(), layoutModelBuilder.dangerousRawAccess().getInstanceId());
        outputFunction.getRenderer().add(group.getTitleHeader(), outputFunction.getRuntime());
        layoutModelBuilder.finishBox();
        layoutModelBuilder.suspendSubFlow();
      }

      layoutModelBuilder.startSubFlow(crosstabLayout.getColumnHeaderSubflowId(gidx));
      createAutomaticCell(layoutModelBuilder);
      crosstabLayout.setColumnHeaderCellId(gidx - crosstabLayout.getFirstColGroupIndex(), layoutModelBuilder.dangerousRawAccess().getInstanceId());
      outputFunction.getRenderer().add(group.getSummaryHeader(), outputFunction.getRuntime());
      layoutModelBuilder.finishBox();
      layoutModelBuilder.suspendSubFlow();

      if (crosstabLayout.isGenerateMeasureHeaders())
      {
        layoutModelBuilder.startSubFlow(crosstabLayout.getMeasureHeaderSubflowId());
        createAutomaticCell(layoutModelBuilder);
        outputFunction.getRenderer().add(dataBody.getHeader(), outputFunction.getRuntime());
        layoutModelBuilder.finishBox();
        layoutModelBuilder.suspendSubFlow();
      }
    }
View Full Code Here

    final CrosstabColumnGroup columnGroup = columnGroupBody.getGroup();
    columnGroup.setField("Cols");
    columnGroup.getTitleHeader().addElement(createDataItem("Cols"));
    columnGroup.getHeader().addElement(createFieldItem("Cols"));

    final CrosstabCellBody body = (CrosstabCellBody) columnGroup.getBody();
    final CrosstabCell cell = new CrosstabCell();
    cell.addElement(createFieldItem("Data"));
    body.addElement(cell);
    return crosstabGroup;
  }
View Full Code Here

    final CrosstabColumnGroup columnGroup = columnGroupBody.getGroup();
    columnGroup.setField("Cols");
    columnGroup.getTitleHeader().addElement(createDataItem("Cols"));
    columnGroup.getHeader().addElement(createFieldItem("Cols"));

    final CrosstabCellBody body = (CrosstabCellBody) columnGroup.getBody();
    final CrosstabCell cell = new CrosstabCell();
    cell.addElement(createFieldItem("Data"));
    body.addElement(cell);
    return crosstabGroup;
  }
View Full Code Here

    {
      crosstabLayout.startSummaryRowProcessing(false, gidx, null);
      return;
    }

    final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
    final CrosstabCell element = dataBody.findElement(group.getField(), null);
    if (element == null)
    {
      crosstabLayout.startSummaryRowProcessing(false, gidx, null);
      return;
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.CrosstabCellBody

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.