Examples of InlineSequenceElement


Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    long endPosition = getEndOfLine();
    long segmentStart = getStartOfSegment(segment);

    for (int i = endIndex - 1; i >= 0; i--)
    {
      final InlineSequenceElement element = sequenceElements[i];
      final long elementWidth = element.getMaximumWidth(nodes[i]);
      long elementStart = endPosition - elementWidth;
      if (elementStart < startOfLine)
      {
        // this element will not fit. Skip it.
        return false;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    // a thing we do not handle yet)
    final int endIndex = start + count;
    long usedWidth = 0;
    long usedWidthToStart = 0;
    int contentIndex = start;
    InlineSequenceElement contentElement = null;
    for (int i = 0; i < endIndex; i++)
    {
      final InlineSequenceElement element = sequenceElements[i];
      final RenderNode node = nodes[i];
      usedWidth += element.getMaximumWidth(node);
      if (i < start)
      {
        usedWidthToStart += element.getMaximumWidth(node);
      }
      if (element instanceof StartSequenceElement ||
          element instanceof EndSequenceElement)
      {
        continue;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    long length = sequenceList.getMinimumLength(startPosition);
    boolean lastNodeWasSpacer = (lastType == InlineSequenceElement.Classification.CONTENT &&
          sequenceList.getNode(startPosition).getNodeType() == LayoutNodeTypes.TYPE_NODE_SPACER);
    for (int i = startPosition + 1; i < sequenceList.size(); i += 1)
    {
      final InlineSequenceElement sequenceElement = sequenceList.getSequenceElement(i);
      final InlineSequenceElement.Classification classification = sequenceElement.getType();
      if (lastNodeWasSpacer == false &&
          lastType != InlineSequenceElement.Classification.START &&
          classification != InlineSequenceElement.Classification.END)
      {
        final int chunkStart = startPosition;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    boolean first = stripFirstSpacer;
    long length = 0;
    for (int i = chunk.getStart(); i < chunkEnd; i++)
    {
      final RenderNode node = chunk.getNode(i);
      final InlineSequenceElement sequenceElement = chunk.getSequenceElement(i);
      final InlineSequenceElement.Classification classification = sequenceElement.getType();
      if (classification == InlineSequenceElement.Classification.CONTENT)
      {
        if (first && node.getNodeType() == LayoutNodeTypes.TYPE_NODE_SPACER)
        {
          continue;
        }
        first = false;
      }
      final long minimumLength = sequenceElement.getMaximumWidth(node);
      length  += minimumLength;
    }
    return length;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

        // simple, add that chunk ..
        final int chunkEnd = chunk.getEnd();
        for (int i = chunk.getStart(); i < chunkEnd; i++)
        {
          final RenderNode node = chunk.getNode(i);
          final InlineSequenceElement sequenceElement = chunk.getSequenceElement(i);
          final InlineSequenceElement.Classification classification = sequenceElement.getType();
          final long minimumLength = sequenceElement.getMaximumWidth(node);

          if (classification == InlineSequenceElement.Classification.START)
          {
            node.setCachedX(posX);
            final RenderBox renderBox = (RenderBox) node.derive(false);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    int startIndex = 0;
    boolean lastNodeWasSpacer = (lastElementType == InlineSequenceElement.CONTENT &&
        nodes[0].getNodeType() == LayoutNodeTypes.TYPE_NODE_SPACER);
    for (int i = 1; i < maxPos; i++)
    {
      final InlineSequenceElement element = elements[i];
      final int elementType = element.getClassification();
      if (lastNodeWasSpacer == false &&
          lastElementType != InlineSequenceElement.START &&
          elementType != InlineSequenceElement.END)
      {
        final int newIndex = handleElement(startIndex, i - startIndex);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    RenderBox firstBox = null;
    RenderBox box = null;
    for (int i = 0; i < lastPosition; i++)
    {
      final RenderNode node = nodes[i];
      final InlineSequenceElement element = sequenceElements[i];
      if (element instanceof EndSequenceElement)
      {
        contexts.pop();
        final long boxX2 = (elementPositions[i] + elementDimensions[i]);
        box.setCachedWidth(boxX2 - box.getCachedX());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

    boolean changed = false;
    int targetIndex = 0;
    for (int i = 0; i < this.sequenceFill; i += 1)
    {
      final InlineSequenceElement ise = this.sequenceElements[i];
      final InlineSequenceElement.Classification type = ise.getType();
      if (type == InlineSequenceElement.Classification.CONTENT)
      {
        final RenderNode node = this.nodes[i];
        if (node instanceof SpacerRenderNode)
        {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

      // First, the simple case: The line's content did fully fit into the linebox. No linebreaks were necessary.
      RenderBox firstBox = null;
      for (int i = 0; i < lastPosition; i++)
      {
        final RenderNode node = nodes[i];
        final InlineSequenceElement element = sequenceElements[i];
        if (element instanceof EndSequenceElement)
        {
          final long boxX2 = (elementPositions[i] + elementDimensions[i]);
          final RenderBox box = (RenderBox) node;
          box.setCachedWidth(boxX2 - box.getCachedX());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.process.layoutrules.InlineSequenceElement

  {
    long spacerCount = 0;
    for (int i = 0; i < index; i++)
    {
      // justify text
      final InlineSequenceElement ise = sequenceElements[i];
      final RenderNode node = nodes[i];
      if (node.getNodeType() == LayoutNodeTypes.TYPE_NODE_SPACER)
      {
        spacerCount += ise.getMaximumWidth(node);
      }
    }

    if (spacerCount > 0)
    {
      final double extraSpacePerSpacerUnit = extraSpace / (double) spacerCount;
      long shift = 0;
      for (int i = 0; i < index; i++)
      {
        elementPositions[i] += shift;

        // justify text
        final InlineSequenceElement ise = sequenceElements[i];
        final RenderNode node = nodes[i];
        if (node.getNodeType() == LayoutNodeTypes.TYPE_NODE_SPACER)
        {
          final long width = ise.getMaximumWidth(node);
          final long extraSpaceHere = (long) (extraSpacePerSpacerUnit * width);
          elementDimensions[i] += extraSpaceHere;
          shift += extraSpaceHere;
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.