Package org.jfree.util

Examples of org.jfree.util.FastStack


    {
      throw new NullPointerException();
    }
    this.contentGenerator = contentGenerator;
    this.layoutProcess = layoutProcess;
    this.flowContexts = new FastStack();
  }
View Full Code Here


      return false;
    }

    final IntList roles = new IntList(5);
    final IntList models = new IntList(5);
    final FastStack contexts = new FastStack();
    while (fc.getCurrentState() == FlowContext.STATE_SUSPEND)
    {
      contexts.push(fc.getCurrentLayoutContext());
      roles.push(fc.getCurrentDisplayRole());
      models.push(fc.getCurrentDisplayModel());
      fc.close();
    }

    while (contexts.isEmpty() == false)
    {
      final LayoutContext lc = (LayoutContext) contexts.pop();
      final int role = roles.pop();
      final int model = models.pop();
      final int cleanRole = role & 0xFFFFFF;
      if (cleanRole == TYPE_INLINE)
      {
View Full Code Here

    {
      try
      {
        final FastDisplayModelBuilder fmb = new FastDisplayModelBuilder();
        fmb.layoutProcess = layoutProcess;
        fmb.flowContexts = new FastStack();
        fmb.suspendCounter = suspendCounter;
        for (int i = 0; i < contexts.length; i++)
        {
          final FlowContext context = contexts[i];
          fmb.flowContexts.push(context.clone());
View Full Code Here

  private FastStack tableStack;
  private TableInfoStructure currentTable;

  public TableValidationStep()
  {
    tableStack = new FastStack();
  }
View Full Code Here

  private FastStack tableStack;
  private TableInfoStructure currentTable;

  public ComputeTableICMMetricsStep()
  {
    tableStack = new FastStack();
  }
View Full Code Here


  public StyleSheetHandler()
  {
    this.namespaces = new HashMap();
    this.parentRules = new FastStack();
  }
View Full Code Here

  private TableInfoStructure currentTable;
  private long shiftDistance;

  public TableRowHeightStep()
  {
    tableStack = new FastStack();
  }
View Full Code Here

      }
    }

    // now, build the line and update the array ..
    final ArrayList pendingElements = new ArrayList();
    final FastStack contexts = new FastStack();
    RenderBox firstBox = null;
    RenderBox box = null;
    for (int i = 0; i < lastPosition; i++)
    {
      final InlineSequenceElement element = sequenceElements[i];
      if (element instanceof EndSequenceElement)
      {
        contexts.pop();
        final long boxX2 = (elementPositions[i] + elementDimensions[i]);
        //noinspection ConstantConditions
        box.setWidth(boxX2 - box.getX());

        if (contexts.isEmpty())
        {
          box = null;
        }
        else
        {
          final RenderNode node = box;
          box = (RenderBox) contexts.peek();
          box.addGeneratedChild(node);
        }
        continue;
      }

      if (element instanceof StartSequenceElement)
      {
        final RenderNode node = element.getNode();
        box = (RenderBox) node.derive(false);
        box.setX(elementPositions[i]);
        contexts.push(box);
        if (firstBox == null)
        {
          firstBox = box;
        }
        continue;
      }

      if (box == null)
      {
        throw new IllegalStateException("Invalid sequence: " +
            "Cannot have elements before we open the box context.");
      }

      // Content element: Perform a deep-derive, so that we preserve the
      // possibly existing sub-nodes.
      final RenderNode child = element.getNode().derive(true);
      child.setX(elementPositions[i]);
      child.setWidth(elementDimensions[i]);
      if (box.isPreserveSpace() != false)
      {
        box.addGeneratedChild(child);
        continue;
      }

      if (child.isIgnorableForRendering())
      {
        pendingElements.add(child);
      }
      else
      {
        for (int j = 0; j < pendingElements.size(); j++)
        {
          final RenderNode node = (RenderNode) pendingElements.get(j);
          box.addGeneratedChild(node);
        }
        pendingElements.clear();
        box.addGeneratedChild(child);
      }
    }

    // Remove all spacers and other non printable content that might
    // look ugly at the beginning of a new line ..
    for (; lastPosition < sequenceFill; lastPosition++)
    {
      final RenderNode node = sequenceElements[lastPosition].getNode();
      if (node.isDiscardable() == false)
      {
        break;
      }
    }

    // If there are open contexts, then add the split-result to the new line
    // and update the width of the current line
    final int openContexts = contexts.size();
    for (int i = 0; i < openContexts; i++)
    {
      final RenderBox renderBox = (RenderBox) contexts.get(i);
      renderBox.setWidth(getEndOfLine() - box.getX());

      final InlineRenderBox rightBox = (InlineRenderBox)
          renderBox.split(RenderNode.HORIZONTAL_AXIS);
      sequenceElements[i] = new StartSequenceElement(rightBox);
View Full Code Here

  private FastStack paragraphNesting;
  private ParagraphLineBreakState breakState;

  public ParagraphLineBreakStep()
  {
    paragraphNesting = new FastStack();
  }
View Full Code Here

  private TableInfoStructure currentTable;
  private long shiftDistance;

  public TableRowHeightStep()
  {
    tableStack = new FastStack();
  }
View Full Code Here

TOP

Related Classes of org.jfree.util.FastStack

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.