Package org.jfree.layouting.renderer.model

Examples of org.jfree.layouting.renderer.model.ParagraphRenderBox


      return;
    }

    breakState.add(new EndSequenceElement(inlineRenderBox));

    final ParagraphRenderBox paragraph = breakState.getParagraph();
    final CSSValue lastLineAlignment = paragraph.getLastLineAlignment();
    final CSSValue textAlignment = paragraph.getTextAlignment();
    // Todo: Start the layouting on primary sequence ...

    // This aligns all direct childs. Once that is finished, we have to
    // check, whether possibly existing inner-paragraphs are still valid
    // or whether moving them violated any of the inner-pagebreak constraints.
    final TextAlignmentProcessor processor = create(textAlignment, lastLineAlignment);
    final InlineSequenceElement[] sequence = breakState.getSequence();

    if (sequence.length == 0)
    {
      return;
    }

    final long lineStart = paragraph.getContentAreaX1();
    final long lineEnd = paragraph.getContentAreaX2();
    if (lineEnd - lineStart <= 0)
    {
      final long minimumChunkWidth = paragraph.getMinimumChunkWidth();
      processor.initialize(sequence,
          lineStart, lineStart + minimumChunkWidth, pageGrid);
      Log.warn("Auto-Corrected zero-width linebox.");
    }
    else
    {
      processor.initialize(sequence, lineStart, lineEnd, pageGrid);
    }

    while (processor.hasNext())
    {
      final RenderNode linebox = processor.next();
      if (linebox instanceof ParagraphPoolBox == false)
      {
        throw new NullPointerException("Line must not be null");
      }

      paragraph.addGeneratedChild(linebox);
    }
  }
View Full Code Here


      processBoxChilds(box);
      finishNormalFlow(box);
    }
    else if (node instanceof ParagraphRenderBox)
    {
      final ParagraphRenderBox box = (ParagraphRenderBox) node;
      if (startBlockBox(box))
      {
        processParagraphChilds(box);
      }
      finishBlockBox(box);
    }
    else if (node instanceof LogicalPageBox)
    {
      final LogicalPageBox box = (LogicalPageBox) node;
      if (startBlockBox(box))
      {
        startProcessing(box.getHeaderArea());
        processBoxChilds(box);
        startProcessing(box.getFooterArea());
      }
      finishBlockBox(box);
    }
    else if (node instanceof BlockRenderBox)
    {
View Full Code Here

TOP

Related Classes of org.jfree.layouting.renderer.model.ParagraphRenderBox

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.