Package org.jfree.layouting.renderer.model

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


      if (box instanceof ParagraphRenderBox)
      {
        computeContentArea(box);

        final ParagraphRenderBox paragraphBox = (ParagraphRenderBox) box;

        if (continuedElement == null)
        {
          final BlockRenderBox lineboxContainer = paragraphBox.getLineboxContainer();
          final boolean unchanged =
              lineboxContainer.getChangeTracker() == paragraphBox.getMinorLayoutAge();
          if (unchanged)
          {
            return false;
          }
        }

        paragraphBox.clearLayout();
        breakState = new ParagraphBreakState(paragraphBox);
      }
      else if (box instanceof TableCellRenderBox)
      {
        // todo: Cannot be done unless the inner paragraphs have been layouted once ..
View Full Code Here


      }

      if (box instanceof ParagraphRenderBox)
      {
        // finally update the change tracker ..
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        paraBox.setMinorLayoutAge(paraBox.getLineboxContainer().getChangeTracker());

        breakState = null;
      }
    }
View Full Code Here

      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

  protected void finishBlockLevelBox(final RenderBox box)
  {
    if (box instanceof ParagraphRenderBox)
    {
      final ParagraphRenderBox paragraph = (ParagraphRenderBox) box;
      finishParagraph(paragraph);
      return;
    }
    else if (box instanceof TableRenderBox)
    {
View Full Code Here

    if (breakState == null)
    {
      if (box instanceof ParagraphRenderBox)
      {
        final ParagraphRenderBox paragraphBox = (ParagraphRenderBox) box;
        // We cant cache that ... the shift operations later would misbehave
        // One way around would be to at least store the layouted offsets
        // (which should be immutable as long as the line did not change its
        // contents) and to reapply them on each run. This is cheaper than
        // having to compute the whole v-align for the whole line.
View Full Code Here

      }

      if (box instanceof ParagraphRenderBox)
      {
        // finally update the change tracker ..
        final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        paraBox.setMajorLayoutAge(paraBox.getLineboxContainer().getChangeTracker());

        breakState = null;
      }
    }
View Full Code Here

    if (breakState == null)
    {
      if (box instanceof ParagraphRenderBox)
      {
        final ParagraphRenderBox paragraphBox = (ParagraphRenderBox) box;
        // We cant cache that ... the shift operations later would misbehave
        // One way around would be to at least store the layouted offsets
        // (which should be immutable as long as the line did not change its
        // contents) and to reapply them on each run. This is cheaper than
        // having to compute the whole v-align for the whole line.
View Full Code Here

      }

      if (box instanceof ParagraphRenderBox)
      {
        // finally update the change tracker ..
        ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        paraBox.setMajorLayoutAge(paraBox.getLineboxContainer().getChangeTracker());

        breakState = null;
      }
    }
View Full Code Here

      if (box instanceof ParagraphRenderBox)
      {
        computeContentArea(box);

        ParagraphRenderBox paragraphBox = (ParagraphRenderBox) box;

        if (continuedElement == null)
        {
          final BlockRenderBox lineboxContainer = paragraphBox.getLineboxContainer();
          final boolean unchanged =
              lineboxContainer.getChangeTracker() == paragraphBox.getMinorLayoutAge();
          if (unchanged)
          {
            return false;
          }
        }

        paragraphBox.clearLayout();
        breakState = new ParagraphBreakState(paragraphBox);
      }
      else if (box instanceof TableCellRenderBox)
      {
        // todo: Cannot be done unless the inner paragraphs have been layouted once ..
View Full Code Here

      }

      if (box instanceof ParagraphRenderBox)
      {
        // finally update the change tracker ..
        ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
        paraBox.setMinorLayoutAge(paraBox.getLineboxContainer().getChangeTracker());

        breakState = null;
      }
    }
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.