Examples of SpacerRenderNode


Examples of org.pentaho.reporting.engine.classic.core.layout.model.SpacerRenderNode

        return;
      }

      if (nodeType == LayoutNodeTypes.TYPE_NODE_SPACER)
      {
        final SpacerRenderNode spacer = (SpacerRenderNode) node;
        final int count = Math.max(1, spacer.getSpaceCount());
        for (int i = 0; i < count; i++)
        {
          xmlWriter.writeText(" ");
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.SpacerRenderNode

    {
      // This is a forced linebreak, caused by a \n somewhere at the beginning of the text or after a whitespace.
      // If there is a preservable whitespace, the leading margin will be non-zero.
      if (leadingMargin > 0)
      {
        final SpacerRenderNode spacer = new SpacerRenderNode(RenderableText.convert(leadingMargin), 0, true, spaceCount);
        words.add(spacer);
      }
      if (forceLinebreak)
      {
        final ExtendedBaselineInfo info = getBaselineInfo('\n');
///        TextUtility.createBaselineInfo('\n', fontMetrics, baselineInfo);
        final RenderableText text = new RenderableText(layoutContext, elementType, instanceId, attributeMap,
            info, DefaultRenderableTextFactory.EMPTY_GLYPHS, 0, 0, lastLanguage, true);
        words.add(text);
      }
      leadingMargin = 0;
      spaceCount = 0;
      return;
    }

    //final DefaultGlyph[] glyphs = (DefaultGlyph[]) glyphList.toArray(new DefaultGlyph[glyphList.size()]);
    if (leadingMargin > 0)// && words.isEmpty() == false)
    {
      final SpacerRenderNode spacer = new SpacerRenderNode(RenderableText.convert(leadingMargin), 0, true, spaceCount);
      words.add(spacer);
    }

    // Compute a suitable text-metrics object for this text. We simply assume that the first character is representive
    // for all characters of the text chunk. This may be a wrong assumption in complex-text environments but will work
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.