Package org.jfree.util

Examples of org.jfree.util.FastStack


    masterRow.setReportDataRow(ReportDataRow.createDataRow
        (reportDataFactory, query, dataRow.getGlobalView()));

    final DefaultFlowController fc = new DefaultFlowController(this, masterRow);
    fc.reportStack.push(new ReportDataContext(fc.markStack, advanceRequested));
    fc.markStack = new FastStack();
    fc.dataRow = masterRow;
    return fc;
  }
View Full Code Here


          (masterRow, outputParameters));
    }

    final DefaultFlowController fc = new DefaultFlowController(this, masterRow);
    fc.reportStack.push(new ReportDataContext(fc.markStack, advanceRequested));
    fc.markStack = new FastStack();
    fc.dataRow = masterRow;
    return fc;
  }
View Full Code Here

                             final String target,
                             final ImageService imageService)
      throws ReportProcessingException
  {
    super(reportJob, resourceManager, baseResource, inputRepository, outputRepository, target, imageService);
    activePageContext = new FastStack();
    this.sectionNames = new AttributeNameGenerator();

    this.tableLayoutConfig = TABLE_LAYOUT_SINGLE_DETAIL_TABLE;
  }
View Full Code Here

    this.context = context;
    this.dependencyCollector = new DependencyCollector(source, version);
    this.objectRegistry = new HashMap();
    this.parserConfiguration = new DefaultConfiguration();
    this.commentHandler = new CommentHandler();
    this.namespaces = new FastStack();
  }
View Full Code Here

    {
      throw new NullPointerException();
    }

    this.outerScopes.push(this.currentHandlers);
    this.currentHandlers = new FastStack();
    this.currentHandlers.push(handler);
    handler.startElement(uri, tagName, attrs);

  }
View Full Code Here

   *
   * @throws SAXException not in this implementation.
   */
  public void startDocument() throws SAXException
  {
    this.outerScopes = new FastStack();
    this.currentHandlers = new FastStack();
    if (rootHandler != null)
    {
      // When dealing with the multiplexing beast, we cant define a
      // root handler unless we've seen the first element and all its
      // namespace declarations ...
View Full Code Here

      if (paragraph == null)
      {
        throw new NullPointerException();
      }
      this.paragraph = paragraph;
      this.contexts = new FastStack();
    }
View Full Code Here

    {
      throw new NullPointerException("SafeTags must not be null");
    }

    this.safeTags = safeTags;
    this.openTags = new FastStack();
    this.indentString = indentString;
    this.lineEmpty = true;
    this.writeFinalLinebreak = true;
  }
View Full Code Here

    this.target = target;

    this.tableNameGenerator = new AttributeNameGenerator();
    this.autoStyleNameGenerator = new AttributeNameGenerator();
    this.outputRepository = outputRepository;
    this.states = new FastStack();
    this.xmlWriters = new FastStack();
    this.imageNames = new AttributeNameGenerator();

    this.imageProducer = new ImageProducer(inputRepository, outputRepository, imageService);

    try
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

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.