Examples of ParagraphRenderBox


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

    {
      if ((nodeType & LayoutNodeTypes.MASK_BOX_BLOCK) == LayoutNodeTypes.MASK_BOX_BLOCK)
      {
        if (nodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
        {
          final ParagraphRenderBox box = (ParagraphRenderBox) node;
          if (startBlockBox(box))
          {
            processParagraphChilds(box);
          }
          finishBlockBox(box);
        }
        else if (nodeType == LayoutNodeTypes.TYPE_BOX_LOGICALPAGE)
        {
          final LogicalPageBox box = (LogicalPageBox) node;
          if (startBlockBox(box))
          {
            startProcessing(box.getWatermarkArea());
            startProcessing(box.getHeaderArea());
            processBoxChilds(box);
            startProcessing(box.getFooterArea());
          }
          finishBlockBox(box);
        }
        else
        {
View Full Code Here

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

  protected final void processInlineLevelChild(final RenderNode node)
  {
    final int type = node.getNodeType();
    if (type == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
    {
      final ParagraphRenderBox box = (ParagraphRenderBox) node;
      if (startInlineLevelBox(box))
      {
        processParagraphChilds(box);
      }
      finishInlineLevelBox(box);
View Full Code Here

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

  protected final void processCanvasLevelChild(final RenderNode node)
  {
    final int nodeType = node.getNodeType();
    if (nodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
    {
      final ParagraphRenderBox box = (ParagraphRenderBox) node;
      if (startCanvasLevelBox(box))
      {
        processParagraphChilds(box);
      }
      finishCanvasLevelBox(box);
View Full Code Here

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

      }
      finishBlockLevelBox(box);
    }
    else if (nodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
    {
      final ParagraphRenderBox box = (ParagraphRenderBox) node;
      if (startBlockLevelBox(box))
      {
        processParagraphChilds(box);
      }
      finishBlockLevelBox(box);
View Full Code Here

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

  protected final void processRowLevelChild(final RenderNode node)
  {
    final int nodeType = node.getNodeType();
    if (nodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH)
    {
      final ParagraphRenderBox box = (ParagraphRenderBox) node;
      if (startRowLevelBox(box))
      {
        processParagraphChilds(box);
      }
      finishRowLevelBox(box);
View Full Code Here

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

    final int parentNodeType = parent.getNodeType();
    final boolean parentIsInlineContainer =
        ((parentNodeType & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE ||
            (parentNodeType == LayoutNodeTypes.TYPE_BOX_PARAGRAPH));
    final RenderBox box = produceBox(band, stateKey, parentIsInlineContainer);
    ParagraphRenderBox paragraphBox = null;
    if (((box.getNodeType() & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE) &&
        parentIsInlineContainer == false)
    {
      // Normalize the rendering-model. Inline-Boxes must always be contained in Paragraph-Boxes ..
      final ElementStyleSheet bandStyle = band.getStyle();
      final SimpleStyleSheet styleSheet = bandCache.getStyleSheet(bandStyle);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      paragraphBox = new ParagraphRenderBox
          (styleSheet, band.getObjectID(), boxDefinition, box.getElementType(), box.getAttributes(), stateKey);
      paragraphBox.setName(band.getName());
      paragraphBox.getBoxDefinition().setPreferredWidth(RenderLength.AUTO);
      paragraphBox.addChild(box);

      parent.addChild(paragraphBox);
    }
    else
    {
      parent.addChild(box);
    }

    final boolean invConsSpace = box.getStyleSheet().getBooleanStyleProperty
        (ElementStyleKeys.INVISIBLE_CONSUMES_SPACE, box.getNodeType() == LayoutNodeTypes.TYPE_BOX_ROWBOX);

    final Element[] elementBuffer = band.unsafeGetElementArray();
    final int elementCount = band.getElementCount();
    for (int i = 0; i < elementCount; i++)
    {
      final Element element = elementBuffer[i];
      if (element.isVisible() == false && invConsSpace == false)
      {
        continue;
      }

      if (element instanceof Band)
      {
        final Band childBand = (Band) element;
        add(box, childBand, runtime, stateKey);
        continue;
      }

      if (element instanceof SubReport)
      {
        performAddInlineSubReport(runtime, stateKey, box, (SubReport) element);
        continue;
      }

      final Object value = computeValue(runtime, element);
      if (value instanceof Element)
      {
        final Band b = RichTextConverterUtilities.convertToBand(definedStyleKeys, element, (Element) value);
        add(box, b, runtime, stateKey);
      }
      else
      {
        performRenderValue(runtime, stateKey, box, element, value);
      }

      // if value instanceof element, then treat the element as band, and the value as sub-element to the band.
    }

    if (paragraphBox != null)
    {
      paragraphBox.close();
    }

    box.close();
  }
View Full Code Here

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

    }
    else
    {
      final StyleSheet styleSheet = bandCache.getStyleSheet(elementStyle);
      final BoxDefinition boxDefinition = boxDefinitionFactory.getBoxDefinition(styleSheet);
      final ParagraphRenderBox autoParagraphBox = new ParagraphRenderBox
          (styleSheet, element.getObjectID(), boxDefinition, element.getElementType(), element.getAttributes(),
              stateKey);
      autoParagraphBox.setRawValue(rawValue);
      autoParagraphBox.setName(element.getName());
      autoParagraphBox.getBoxDefinition().setPreferredWidth(RenderLength.AUTO);
      autoParagraphBox.addChilds(renderNodes);
      autoParagraphBox.addChilds(finishNodes);
      autoParagraphBox.close();
      final Object property = styleSheet.getStyleProperty(styleKey);
      parentBox.addChild(autoParagraphBox);
    }
  }
View Full Code Here

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

    if (box instanceof ParagraphRenderBox)
    {
      if (PRINT_LINEBOX_CONTENTS)
      {
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        logger.debug("----------------  START PARAGRAPH POOL CONTAINER -------------------------------------");
        printBox(paraBox.getPool(), level + 1);
        logger.debug("---------------- FINISH PARAGRAPH POOL CONTAINER -------------------------------------");

        if (paraBox.isComplexParagraph())
        {
          logger.debug("----------------  START PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          printBox(paraBox.getLineboxContainer(), level + 1);
          logger.debug("---------------- FINISH PARAGRAPH LINEBOX CONTAINER -------------------------------------");
        }
      }
    }
View Full Code Here

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

    if (box instanceof ParagraphRenderBox)
    {
      if (PRINT_LINEBOX_CONTENTS)
      {
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        if (paraBox.isComplexParagraph())
        {
          writer.write("----------------  START PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          writer.write("\n");
          printBox(writer, paraBox.getLineboxContainer(), level + 1);
          writer.write("---------------- FINISH PARAGRAPH LINEBOX CONTAINER -------------------------------------");
          writer.write("\n");
        }
      }
    }
View Full Code Here

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

    assertEquals(4, richText.getStyleChunks().size());
    assertEquals("Label@LabelLabel", richText.getText());

    RenderNode second = MatchFactory.findElementByName(logicalPageBox, "second");
    assertTrue(second instanceof ParagraphRenderBox);
    ParagraphRenderBox p = (ParagraphRenderBox) second;
    assertTrue(p.getPool().getFirstChild().getNext() instanceof RenderableReplacedContentBox);

    assertTrue(second.getHeight() > StrictGeomUtility.toInternalValue(20));
    RenderNode[] secondText = MatchFactory.findElementsByNodeType(second, LayoutNodeTypes.TYPE_NODE_COMPLEX_TEXT);
    assertTrue(secondText.length > 10); // this is an approximate value. There is no safe stable value with complex text
    assertTrue(secondText[0] instanceof RenderableComplexText);
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.