Package org.pentaho.reporting.engine.classic.core.util

Examples of org.pentaho.reporting.engine.classic.core.util.InstanceID


    final RenderableTextFactory textFactory = new DefaultRenderableTextFactory(outputProcessorMetaData);
    textFactory.startText();

    final RenderNode[] renderNodes = textFactory.createText(bufferArray, 0, buffer.getLength(),
        SimpleStyleSheet.EMPTY_STYLE, AutoLayoutBoxType.INSTANCE, new InstanceID(), ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();
    if (renderNodes.length > 0)
    {
      return renderNodes[0];
    }
View Full Code Here


  private RichTextSpec createText()
  {
    Map<AttributedCharacterIterator.Attribute, Object> attrs =
        new HashMap<AttributedCharacterIterator.Attribute, Object>();
    List<RichTextSpec.StyledChunk> chunks = new ArrayList<RichTextSpec.StyledChunk>();
    InstanceID id = new InstanceID();
    chunks.add(new RichTextSpec.StyledChunk(0, 3, new SpacerRenderNode(), attrs,
        new ReportAttributeMap<Object>(), ElementDefaultStyleSheet.getDefaultStyle(), new InstanceID(), "ABC"));
    chunks.add(new RichTextSpec.StyledChunk(3, 6, new SpacerRenderNode(), attrs,
        new ReportAttributeMap<Object>(), ElementDefaultStyleSheet.getDefaultStyle(), new InstanceID(), "def"));
    chunks.add(new RichTextSpec.StyledChunk(6, 9, new SpacerRenderNode(), attrs,
        new ReportAttributeMap<Object>(), ElementDefaultStyleSheet.getDefaultStyle(), new InstanceID(), "GHI"));
    chunks.add(new RichTextSpec.StyledChunk(9, 12, new SpacerRenderNode(), attrs,
        new ReportAttributeMap<Object>(), ElementDefaultStyleSheet.getDefaultStyle(), new InstanceID(), "jkl"));
    chunks.add(new RichTextSpec.StyledChunk(12, 15, new SpacerRenderNode(), attrs,
        new ReportAttributeMap<Object>(), ElementDefaultStyleSheet.getDefaultStyle(), new InstanceID(), "MNO"));
    return new RichTextSpec("ABCdefGHIjklMNO", TextDirection.LTR, chunks);
  }
View Full Code Here

    final int[] data = buffer.getBuffer();

    final int length = buffer.getLength();
    final ElementDefaultStyleSheet defaultStyle = ElementDefaultStyleSheet.getDefaultStyle();
    final RenderNode[] renderNodes =
        textFactory.createText(data, 0, length, new SimpleStyleSheet(defaultStyle), LegacyType.INSTANCE, new InstanceID(),
            ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();

    assertNotNull(renderNodes);
    assertEquals(renderNodes.length, 3);
View Full Code Here

    final int[] data = buffer.getBuffer();

    final int length = buffer.getLength();
    final ElementDefaultStyleSheet defaultStyle = ElementDefaultStyleSheet.getDefaultStyle();
    final RenderNode[] renderNodes =
        textFactory.createText(data, 0, length, new SimpleStyleSheet(defaultStyle), LegacyType.INSTANCE, new InstanceID(),
            ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();

    assertNotNull(renderNodes);
    assertEquals(renderNodes.length, 3);
View Full Code Here

    final Element element = new Element();
    final int length = buffer.getLength();
    element.getStyle().setStyleProperty(TextStyleKeys.WHITE_SPACE_COLLAPSE, WhitespaceCollapse.DISCARD);
    final RenderNode[] renderNodes =
        textFactory.createText(data, 0, length, SimpleStyleResolver.resolveOneTime(element), LegacyType.INSTANCE, new InstanceID(),
            ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();

  }
View Full Code Here

    String sourceText = new String(new char[]{768, 768, 69, 114, 114, 111, 114}); // String sourceText = "?Error";
    CodePointBuffer buffer = Utf16LE.getInstance().decodeString(sourceText, null);
    final int[] data = buffer.getBuffer();

    textFactory.createText(data, 0, buffer.getLength(), new SimpleStyleSheet(ElementDefaultStyleSheet.getDefaultStyle()), TextFieldType.INSTANCE, new InstanceID(),
        ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();

    assertNotNull(finishNodes);
    assertEquals(finishNodes.length, 1);
View Full Code Here

    final RenderableTextFactory textFactory = new DefaultRenderableTextFactory(outputProcessorMetaData);
    textFactory.startText();

    final RenderNode[] renderNodes = textFactory.createText(bufferArray, 0, buffer.getLength(),
        SimpleStyleSheet.EMPTY_STYLE, AutoLayoutBoxType.INSTANCE, new InstanceID(), ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();
    if (renderNodes.length > 0)
    {
      return renderNodes[0];
    }
View Full Code Here

    List<AttributedStringChunk> attr = new ArrayList<AttributedStringChunk>();
    computeText(lineBoxContainer, attr);
    if (attr.isEmpty())
    {
      attr.add(new AttributedStringChunk("", computeStyle(lineBoxContainer.getStyleSheet()),
          lineBoxContainer.getAttributes(), lineBoxContainer.getStyleSheet(), new InstanceID(), lineBoxContainer));
    }

    attr = processWhitespaceRules(lineBoxContainer, attr);

    StringBuilder text = new StringBuilder();
View Full Code Here

    for (int i = crosstabLayout.getFirstColGroupIndex(), count = 0; i < gidx; i += 1, count += 1)
    {
      if (crosstabLayout.isGenerateColumnTitleHeaders())
      {
        final InstanceID columnTitleHeaderId = crosstabLayout.getColumnTitleHeaderCellId(i - crosstabLayout.getFirstColGroupIndex());
        final RenderNode columnTitleHeaderCell = CrosstabOutputHelper.findNode(section, columnTitleHeaderId);
        if (columnTitleHeaderCell instanceof TableCellRenderBox)
        {
          final TableCellRenderBox cellBox = (TableCellRenderBox) columnTitleHeaderCell;
          cellBox.update(cellBox.getRowSpan(), cellBox.getColSpan() + 1);
        }
        else
        {
          throw new IllegalStateException("Unable to find node for previous column title header. Aborting report processing.");
        }
      }

      final InstanceID columnHeaderId = crosstabLayout.getColumnHeaderCellId(i - crosstabLayout.getFirstColGroupIndex());
      final RenderNode columnHeaderCell = CrosstabOutputHelper.findNode(section, columnHeaderId);
      if (columnHeaderCell instanceof TableCellRenderBox)
      {
        final TableCellRenderBox cellBox = (TableCellRenderBox) columnHeaderCell;
        cellBox.update(cellBox.getRowSpan(), cellBox.getColSpan() + 1);
View Full Code Here

    final RenderableTextFactory textFactory = new DefaultRenderableTextFactory(outputProcessorMetaData);
    textFactory.startText();

    final RenderNode[] renderNodes = textFactory.createText(bufferArray, 0, buffer.getLength(),
        SimpleStyleSheet.EMPTY_STYLE, AutoLayoutBoxType.INSTANCE, new InstanceID(), ReportAttributeMap.EMPTY_MAP);
    final RenderNode[] finishNodes = textFactory.finishText();
    if (renderNodes.length > 0)
    {
      return renderNodes[0];
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.InstanceID

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.