Examples of BlockRenderBox


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

      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

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

      }

      // 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

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

      {
        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

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

    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

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

      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

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

      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

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

        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

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

      box = new InlineRenderBox(styleSheet, element.getObjectID(), boxDefinition, element.getElementType(),
          element.getAttributes(), stateKey);
    }
    else
    {
      box = new BlockRenderBox(styleSheet, element.getObjectID(), boxDefinition, element.getElementType(),
          element.getAttributes(), stateKey);
    }
    box.getStaticBoxLayoutProperties().setPlaceholderBox(true);
    box.close();
    parent.addChild(box);
View Full Code Here

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

    final RenderBox box;
    if ("block".equals(layoutType))
    {
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(elementStyleSheet);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      box = new BlockRenderBox(styleSheet, band.getObjectID(), boxDefinition, band.getElementType(),
          band.getAttributes(), stateKey);
    }
    else if ("inline".equals(layoutType))
    {
      if (parentIsInlineBox)
View Full Code Here

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

      getGraphics().clip(createClipRect(getDrawArea()));
      startProcessing(box);
    }
    else if (subType == SectionSubType.HEADER)
    {
      final BlockRenderBox box = getRootBox().getHeaderArea();
      setDrawArea(new StrictBounds(box.getX(), box.getY(), box.getWidth(), box.getHeight()));
      getGraphics().clip(createClipRect(getDrawArea()));
      startProcessing(box);
    }
    else if (subType == SectionSubType.FOOTER)
    {
      final BlockRenderBox box = getRootBox().getFooterArea();
      setDrawArea(new StrictBounds(box.getX(), box.getY(), box.getWidth(), box.getHeight()));
      getGraphics().clip(createClipRect(getDrawArea()));
      startProcessing(box);
    }
    else
    {
      final RenderBox box = getRootBox();
      setDrawArea(new StrictBounds(box.getX(), box.getY(), box.getWidth(), box.getHeight()));
      getGraphics().clip(createClipRect(getDrawArea()));
      processBoxChilds(getRootBox());
    }
  }
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.