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

Examples of org.pentaho.reporting.engine.classic.core.layout.model.BlockRenderBox


    tester.addMajorBreak(30000, 0);
  }

  private RenderBox createBox(final long y, final long height)
  {
    final RenderBox box = new BlockRenderBox();
    box.setY(y);
    box.setHeight(height);
    return box;
  }
View Full Code Here


    tester.addMajorBreak(30000, 0);
  }

  private RenderBox createBox (final long y, final long height)
  {
    final RenderBox box = new BlockRenderBox(SimpleStyleSheet.EMPTY_STYLE, new InstanceID(),
        BoxDefinition.EMPTY, LegacyType.INSTANCE, ReportAttributeMap.EMPTY_MAP, null);
    box.setY(y);
    box.setHeight(height);
    return box;
  }
View Full Code Here

  protected void processPage(final LogicalPageBox rootBox)
  {
    final StrictBounds pageBounds = drawArea;
    startProcessing(rootBox.getWatermarkArea());

    final BlockRenderBox headerArea = rootBox.getHeaderArea();
    final BlockRenderBox footerArea = rootBox.getFooterArea();
    final StrictBounds headerBounds = new StrictBounds(headerArea.getX(), headerArea.getY(), headerArea.getWidth(),
        headerArea.getHeight());
    final StrictBounds footerBounds = new StrictBounds(footerArea.getX(), footerArea.getY(), footerArea.getWidth(),
        footerArea.getHeight());
    final StrictBounds contentBounds = new StrictBounds
        (rootBox.getX(), headerArea.getY() + headerArea.getHeight(),
            rootBox.getWidth(), footerArea.getY() - headerArea.getHeight());
    this.drawArea = headerBounds;
    startProcessing(headerArea);
    this.drawArea = contentBounds;
    processBoxChilds(rootBox);
    this.drawArea = footerBounds;
View Full Code Here

      runPosition += 1;
    }

    for (int i = runPosition; i <= position; i++)
    {
      final BlockRenderBox slotBox = new BlockRenderBox(getBoxStyle());
      slotBox.setName("Slot-" + i);
      container.addChild(slotBox);
      if (i == position)
      {
        return slotBox;
      }
View Full Code Here

      }

      // Note: For now, we limit both the header and footer to a single physical
      // page. This safes me a lot of trouble for now.

      final BlockRenderBox headerArea = pageBox.getHeaderArea();
      final long headerHeight = Math.min(headerArea.getHeight(), allCurrentBreaks[0]);
      headerArea.setHeight(headerHeight);

      final long lastBreakLocal = allCurrentBreaks[allCurrentBreaks.length - 1];
      final BlockRenderBox footerArea = pageBox.getFooterArea();
      long footerHeight = footerArea.getHeight();
      if (allCurrentBreaks.length > 1)
      {
        final long lastPageHeight = lastBreakLocal - allCurrentBreaks[allCurrentBreaks.length - 2];
        footerHeight = Math.min(footerHeight, lastPageHeight);
        footerArea.setHeight(footerHeight);
      }

      // Assertation: Make sure that we do not run into a infinite loop..
      if (headerHeight + footerHeight >= lastBreakLocal)
      {
View Full Code Here

      {
        if (addBox != groupBox)
        {
          addBox.close();
        }
        final BlockRenderBox commonBox = new BlockRenderBox
            (styleSheet, new InstanceID(), BoxDefinition.EMPTY, AutoLayoutBoxType.INSTANCE,
                ReportAttributeMap.EMPTY_MAP, null);
        commonBox.setName("Common-Section");
        groupBox.addChild(commonBox);
        addBox = commonBox;

        nextBoxStart += (int) Math.min(MAXIMUM_COMMON_SIZE, nextBoxStart * GroupSection.COMMON_GROWTH);
      }
View Full Code Here

    final RenderBox box;
    if (insertationPoint == null)
    {
      final SimpleStyleSheet reportStyle = sectionStyleCache.getStyleSheet(styleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(reportStyle);
      box = new BlockRenderBox
          (reportStyle, report.getObjectID(), boxDefinition, SubReportType.INSTANCE, report.getAttributes(), null);
      if (report.getName() != null)
      {
        box.setName("SubReport-Section-" + groupStack.size() + ": name=" + report.getName());
      }
View Full Code Here

      return;
    }

    final SimpleStyleSheet reportStyle = sectionStyleCache.getStyleSheet(group.getStyle());
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(reportStyle);
    final BlockRenderBox groupBox = new BlockRenderBox
        (reportStyle, group.getObjectID(), boxDefinition, group.getElementType(), group.getAttributes(), null);

    groupBox.getStaticBoxLayoutProperties().setPlaceholderBox(true);
    groupBox.setName(group.getElementTypeName() + "-Section-" + groupStack.size());
    addBox(groupBox);
    if (reportStyle.getBooleanStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE))
    {
      this.groupStack.push(new GroupSection(groupBox, bandWithKeepTogetherStyle));
    }
View Full Code Here

      return;
    }

    final SimpleStyleSheet reportStyle = sectionStyleCache.getStyleSheet(groupBody.getStyle());
    final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(reportStyle);
    final BlockRenderBox groupBox = new BlockRenderBox(reportStyle, groupBody.getObjectID(),
        boxDefinition, groupBody.getElementType(), groupBody.getAttributes(), null);

    // todo: PRD-3154: This is black magic, placeholder box true is evil.
    // Need to evaluate side-effects of this beast. Is it safe for keep-together boxes?
    groupBox.getStaticBoxLayoutProperties().setPlaceholderBox(true);
    groupBox.setName("Group-body-" + groupStack.size());
    addBox(groupBox);
    if (reportStyle.getBooleanStyleProperty(ElementStyleKeys.AVOID_PAGEBREAK_INSIDE))
    {
      this.groupStack.push(new GroupSection(groupBox, bandWithKeepTogetherStyle));
    }
View Full Code Here

        markDirty();
        return normalFlowLayoutBuilder.endSection(getPageBox(), sectionBox);
      }
      case Renderer.TYPE_FOOTER:
      {
        final BlockRenderBox footerArea = pageBox.getFooterArea();
        if (sectionBox.getFirstChild() == sectionBox.getLastChild() &&
            isEmptyOrMarker(footerArea.getFirstChild()) &&
            isEmptyOrMarker(sectionBox.getFirstChild()))
        {
          // both boxes are empty, so we can ignore it ...
          return footerLayoutBuilder.endSection(footerArea, sectionBox);
        }

        markDirty();
        return footerLayoutBuilder.endSection(footerArea, sectionBox);
      }
      case Renderer.TYPE_HEADER:
      {
        final BlockRenderBox headerArea = pageBox.getHeaderArea();
        if (sectionBox.getFirstChild() == sectionBox.getLastChild() &&
            isEmptyOrMarker(headerArea.getFirstChild()) &&
            isEmptyOrMarker(sectionBox.getFirstChild()))
        {
          // both boxes are empty, so we can ignore it ...
          return headerLayoutBuilder.endSection(headerArea, sectionBox);
        }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.BlockRenderBox

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.