Package org.jfree.layouting.renderer.model

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


         // bugs in the code ..
          throw new IllegalStateException
                  ("A child cannot be dirty, if the parent is clean");
        }
        // The paragraph is somehow nested in an other paragraph.
        final RenderBox child = (RenderBox) box.deriveFrozen(false);
        breakState.getInsertationPoint().addGeneratedChild(child);
        //breakState.setInsertationPoint(child);
        paragraphBox = (ParagraphRenderBox) child;
      }

      final ParagraphLineBreakState item = new ParagraphLineBreakState(paragraphBox, false);
      paragraphNesting.push(item);
      breakState = item;
    }
    else
    {
      // some other block box .. suspend.
      if (breakState != null)
      {
        if (breakState.isDirty())
        {
          final RenderBox child = (RenderBox) box.deriveFrozen(false);
          breakState.getInsertationPoint().addGeneratedChild(child);
          breakState.setInsertationPoint(child);

          if (breakState.getSuspendItem() == null)
          {
View Full Code Here


    {
      if (breakState != null)
      {
        if (breakState.isDirty())
        {
          final RenderBox parent = breakState.getInsertationPoint().getParent();
          breakState.setInsertationPoint(parent);

          final Object suspender = breakState.getSuspendItem();
          if (box.getInstanceId() == suspender)
          {
View Full Code Here

    if (breakState == null || breakState.isDirty() == false)
    {
      return true;
    }

    final RenderBox child = (RenderBox) box.deriveFrozen(false);
    breakState.getInsertationPoint().addGeneratedChild(child);
    breakState.setInsertationPoint(child);
    return true;
  }
View Full Code Here

    if (breakState == null || breakState.isDirty() == false)
    {
      return;
    }

    final RenderBox parent = breakState.getInsertationPoint().getParent();
    breakState.setInsertationPoint(parent);

    if (breakState.isBreakRequested() && box.getNext() != null)
    {
      performBreak();
View Full Code Here

    // Fill a stack with the current context ..
    // Check if we are at the end of the line
    if (node.getNext() == null)
    {
      boolean endOfLine = true;
      RenderBox parent = node.getParent();
      while (parent != null)
      {
        if (parent instanceof InlineRenderBox == false)
        {
          break;
        }
        if (parent.getNext() != null)
        {
          endOfLine = false;
          break;
        }
        parent = parent.getParent();
      }

      // OK, if we are at the end of the line (for all contexts), so we
      // dont have to perform a break. The text will end anyway ..
      if (endOfLine)
View Full Code Here

    // 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 = breakState.getInsertationPoint();
    final BlockRenderBox lines = breakState.getLines();
    while (context != lines)
    {
      // save the context ..
      if (context instanceof InlineRenderBox == 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 ..
    breakState.setInsertationPoint(lines);
    while (contexts.isEmpty() == false)
    {
      final RenderBox box = (RenderBox) contexts.pop();
      breakState.getInsertationPoint().addGeneratedChild(box);
      breakState.setInsertationPoint(box);
    }

    breakState.setBreakRequested(false);
View Full Code Here

    if (breakState.getSuspendItem() == null)
    {
      breakState.setSuspendItem(box.getInstanceId());
    }

    final RenderBox child = (RenderBox) box.deriveFrozen(false);
    breakState.getInsertationPoint().addGeneratedChild(child);
    breakState.setInsertationPoint(child);

    return true;
  }
View Full Code Here

      if (box.getInstanceId() == suspender)
      {
        breakState.setSuspendItem(null);
      }

      final RenderBox parent = breakState.getInsertationPoint().getParent();
      breakState.setInsertationPoint(parent);
    }
  }
View Full Code Here

  }

  protected RenderLength computeBlockContextWidth (RenderNode node)
  {
    // grab the block-context width ..
    final RenderBox blockContext = node.getParentBlockContext();
    if (blockContext == null)
    {
      return new RenderLength(root.getPageWidth(), false);
    }
    else
    {
      final ComputedLayoutProperties layoutProperties =
              blockContext.getComputedLayoutProperties();
      // the computed width will never be a percentage ..
      return layoutProperties.getComputedWidth();
    }
  }
View Full Code Here

  {
  }

  protected final void startProcessing (RenderNode node)
  {
    RenderBox parent = node.getParent();
    if (parent == null || parent instanceof BlockRenderBox)
    {
      processBlockLevelChild(node);
    }
    else if (parent instanceof InlineRenderBox)
View Full Code Here

TOP

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

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.