Examples of RenderBox


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

          if ((node.getNodeType() & LayoutNodeTypes.MASK_BOX) == LayoutNodeTypes.MASK_BOX)
          {
            // OK, limit the size of the box to the maximum line width and
            // revalidate it.
            final long contentPosition = elementPositions[contentIndex];
            final RenderBox box = (RenderBox) node;
            final long maxWidth = (getEndOfLine() - contentPosition);
            computeInlineBlock(box, contentPosition, maxWidth);

            elementDimensions[endIndex - 1] = node.getCachedWidth();
          }
View Full Code Here

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

          if ((node.getNodeType() & LayoutNodeTypes.MASK_BOX) == LayoutNodeTypes.MASK_BOX)
          {
            // OK, limit the size of the box to the maximum line width and
            // revalidate it.
            final long contentPosition = elementPositions[contentIndex];
            final RenderBox box = (RenderBox) node;
            final long maxWidth = (getEndOfLine() - contentPosition);
            computeInlineBlock(box, contentPosition, maxWidth);

            elementDimensions[endIndex - 1] = node.getCachedWidth();
          }
View Full Code Here

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

  private boolean breakRequested;

  public FullLinebreaker(final ParagraphRenderBox paragraphRenderBox)
  {
    this.paragraphRenderBox = paragraphRenderBox;
    final RenderBox pool = (RenderBox) paragraphRenderBox.getPool().deriveFrozen(false);
    final RenderBox lineboxContainer = this.paragraphRenderBox.createLineboxContainer();
    lineboxContainer.clear();
    lineboxContainer.addGeneratedChild(pool);
    this.paragraphRenderBox.setLineBoxAge(0);
    this.insertationPoint = pool;
  }
View Full Code Here

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

    return true;
  }

  public void startBlockBox(final RenderBox child)
  {
    final RenderBox derived = (RenderBox) child.deriveFrozen(false);
    insertationPoint.addGeneratedChild(derived);
    insertationPoint = derived;
    if (suspendItem != null)
    {
      suspendItem = derived.getInstanceId();
    }
  }
View Full Code Here

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

    paragraphRenderBox.setLineBoxAge(paragraphRenderBox.getPool().getChangeTracker());
  }

  public void startInlineBox(final InlineRenderBox box)
  {
    final RenderBox child = (RenderBox) box.deriveFrozen(false);
    insertationPoint.addGeneratedChild(child);
    insertationPoint = child;
  }
View Full Code Here

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

    // needed to split the box at all. Just let it end naturally is enough for
    // them to look good.

    // As the real context (from the break-State) is currently being built,
    // we have to use the original pool to query the 'is-end-of-line' flag.
    RenderBox context = insertationPoint;
    final RenderBox lines = paragraphRenderBox.getLineboxContainer();
    while (context != lines)
    {
      // save the context ..

      if (((context.getNodeType() & LayoutNodeTypes.MASK_BOX_INLINE) == LayoutNodeTypes.MASK_BOX_INLINE) == false)
      {
        throw new IllegalStateException("Confused: I expect InlineBoxes ..");
      }

      final InlineRenderBox inline = (InlineRenderBox) context;
      contexts.push(inline.split(RenderNode.HORIZONTAL_AXIS));
      context = context.getParent();
    }

    // reset to a known state and add all saved contexts ..
    insertationPoint = lines;
    while (contexts.isEmpty() == false)
    {
      final RenderBox box = (RenderBox) contexts.pop();
      insertationPoint.addGeneratedChild(box);
      insertationPoint = box;
    }

    breakRequested = false;
View Full Code Here

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

    // Then add the header at the top - it starts at (0,0) and thus it is
    // ok to leave it unshifted.

    // finally, move the footer at the bottom (to the page's bottom, please!)
    final RenderBox footerArea = derived.getFooterArea();
    final long footerPosition = pagebox.getPageHeight() -
        (footerArea.getY() + footerArea.getHeight());
    final long footerShift = footerPosition - footerArea.getY();
    BoxShifter.shiftBoxUnchecked(footerArea, footerShift);

    // the renderer is responsible for painting the page-header and footer ..

    derived.setPageOffset(0);
View Full Code Here

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

  {
    if (node == null)
    {
      return 0;
    }
    final RenderBox parent = node.getParent();
    if (parent == null)
    {
      return 0;
    }
    final RenderBox textEllipseBox = parent.getTextEllipseBox();
    if (textEllipseBox == null)
    {
      return 0;
    }
    return textEllipseBox.getWidth();
  }
View Full Code Here

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

            // The text node that is printed will overlap with the ellipse we need to print.
            drawText(text, effectiveAreaX2);
          }
        }

        final RenderBox parent = node.getParent();
        if (parent != null)
        {
          final RenderBox textEllipseBox = parent.getTextEllipseBox();
          if (textEllipseBox != null)
          {
            processBoxChilds(textEllipseBox);
          }
        }
        return;
      }
    }

    if (node.getNodeType() == LayoutNodeTypes.TYPE_NODE_TEXT)
    {
      final RenderableText textNode = (RenderableText) node;
      if (isTextLineOverflow())
      {
        if (textNode.isNodeVisible(paragraphBounds, overflowX, overflowY) == false)
        {
          return;
        }

        final long ellipseSize = extractEllipseSize(node);
        final long x1 = node.getX();
        final long x2 = x1 + node.getWidth();
        final long effectiveAreaX2 = (contentAreaX2 - ellipseSize);
        if (x2 <= effectiveAreaX2)
        {
          // the text will be fully visible.
          drawText(textNode, x2);
        }
        else if (x1 >= contentAreaX2)
        {
          // Skip, the node will not be visible.
        }
        else
        {
          // The text node that is printed will overlap with the ellipse we need to print.
          drawText(textNode, effectiveAreaX2);
          final RenderBox parent = node.getParent();
          if (parent != null)
          {
            final RenderBox textEllipseBox = parent.getTextEllipseBox();
            if (textEllipseBox != null)
            {
              processBoxChilds(textEllipseBox);
            }
          }
View Full Code Here

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

    overflowY = box.isBoxOverflowY();
    //final long y2 = box.getY() + box.getHeight();
    final long contentAreaX1 = box.getContentAreaX1();
    contentAreaX2 = box.getContentAreaX2();

    RenderBox lineBox = (RenderBox) box.getFirstChild();
    while (lineBox != null)
    {
      manualBreak = false;
      processTextLine(lineBox, contentAreaX1, contentAreaX2);
      if (manualBreak)
      {
        addLinebreak();
      }
      else if (lineBox.getNext() != null)
      {
        if (lineBox.getStaticBoxLayoutProperties().isPreserveSpace() == false)
        {
          addSoftBreak();
        }
        else
        {
          addEmptyBreak();
        }
      }
      lineBox = (RenderBox) lineBox.getNext();
    }
  }
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.