Package org.pentaho.reporting.engine.classic.core.modules.output.table.base

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.base.TableRectangle


        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset,
                content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
          // A spanned cell ..
          continue;
        }

        final int sectionType = contentProducer.getSectionType(row, col);
        final CellBackground realBackground = cellBackgroundProducer.getBackgroundAt
            (logicalPage, sheetLayout,
                rectangle.getX1(), rectangle.getY1(), rectangle.getColumnSpan(), rectangle.getRowSpan(), false, sectionType);

        // export the cell and all content ..

        final Cell cell = getCellAt(col, row);
        final CellStyle style = cellStyleProducer.createCellStyle(content, realBackground);
View Full Code Here


        if (content.isCommited() == false)
        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY(), content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
          // A spanned cell ..
          xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "spanned-cell", XmlWriter.CLOSE);
          continue;
        }

        final int sectionType = contentProducer.getSectionType(row, col);
        final CellBackground realBackground = cellBackgroundProducer.getBackgroundAt
            (logicalPageBox, sheetLayout, rectangle.getX1(), rectangle.getY1(), rectangle.getColumnSpan(),
                rectangle.getRowSpan(), false, sectionType);

        final AttributeList attributeList;
        if (realBackground != null)
        {
          attributeList = createCellAttributes(realBackground);
        }
        else
        {
          attributeList = new AttributeList();
        }
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "row-span", String.valueOf(
            rectangle.getRowSpan()));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "col-span", String.valueOf(
            rectangle.getColumnSpan()));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href",
            (String) content.getStyleSheet().getStyleProperty(ElementStyleKeys.HREF_TARGET));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href-window",
            (String) content.getStyleSheet().getStyleProperty(ElementStyleKeys.HREF_WINDOW));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href-title",
View Full Code Here

        if (content.isCommited() == false)
        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY(), content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
          // A spanned cell ..
          xmlWriter.writeTag(LAYOUT_OUTPUT_NAMESPACE, "spanned-cell", XmlWriter.CLOSE);
          continue;
        }

        final CellBackground realBackground = cellBackgroundProducer.getBackgroundAt
            (logicalPage, sheetLayout, rectangle.getX1(), rectangle.getY1(),
                rectangle.getColumnSpan(), rectangle.getRowSpan(), true, sectionType);

        final AttributeList attributeList;
        if (realBackground != null)
        {
          attributeList = createCellAttributes(realBackground);
        }
        else
        {
          attributeList = new AttributeList();
        }
        attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "row-span", String.valueOf(rectangle.getRowSpan()));
        attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "col-span", String.valueOf(rectangle.getColumnSpan()));
        attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "href", (String) content.getStyleSheet().getStyleProperty(
            ElementStyleKeys.HREF_TARGET));
        attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "href-window",
            (String) content.getStyleSheet().getStyleProperty(ElementStyleKeys.HREF_WINDOW));
        attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "href-title",
View Full Code Here

  protected void handleContentConflict(final RenderBox box)
  {
    super.handleContentConflict(box);

    // shall we collect more information?
    final TableRectangle lookupRectangle = getLookupRectangle();
    final int rectX2 = lookupRectangle.getX2();
    final int rectY2 = lookupRectangle.getY2();

    conflictsPerCell.clear();

    for (int r = lookupRectangle.getY1(); r < rectY2; r++)
    {
      for (int c = lookupRectangle.getX1(); c < rectX2; c++)
      {
        final RenderBox content = getContent(r, c);
        if (content != null)
        {
          conflictsPerCell.add(content.getInstanceId());
View Full Code Here

        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset, content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
          // A spanned cell ..
          xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "spanned-cell", XmlWriter.CLOSE);
          continue;
        }

        final CellMarker.SectionType sectionType = contentProducer.getSectionType(row, col);
        final CellBackground realBackground = cellBackgroundProducer.getBackgroundForBox
            (logicalPageBox, sheetLayout, rectangle.getX1(), rectangle.getY1(), rectangle.getColumnSpan(),
                rectangle.getRowSpan(), false, sectionType, content);

        final AttributeList attributeList;
        if (realBackground != null)
        {
          attributeList = createCellAttributes(realBackground);
        }
        else
        {
          attributeList = new AttributeList();
        }
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "row-span",
            pointIntConverter.format(rectangle.getRowSpan()));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "col-span",
            pointIntConverter.format(rectangle.getColumnSpan()));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href",
            (String) content.getStyleSheet().getStyleProperty(ElementStyleKeys.HREF_TARGET));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href-window",
            (String) content.getStyleSheet().getStyleProperty(ElementStyleKeys.HREF_WINDOW));
        attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "href-title",
View Full Code Here

        {
          throw new InvalidReportStateException("Uncommited content encountered");
        }

        final long contentOffset = contentProducer.getContentOffset(row, col);
        final TableRectangle rectangle = sheetLayout.getTableBounds
            (content.getX(), content.getY() + contentOffset,
                content.getWidth(), content.getHeight(), null);
        if (rectangle.isOrigin(col, row) == false)
        {
          // A spanned cell ..
          continue;
        }

        final CellBackground fastBackground = cellBackgroundProducer.getBackgroundForBox
            (logicalPage, sheetLayout, rectangle.getX1(), rectangle.getY1(),
                rectangle.getColumnSpan(), rectangle.getRowSpan(), false, sectionType, content);
        // export the cell and all content ..

        final Cell cell = getCellAt(col, row);
        final CellStyle style =
            getCellStyleProducer().createCellStyle(content.getInstanceId(), content.getStyleSheet(), fastBackground);
View Full Code Here

  }

  @Test
  public void testImageAligningToCells()
  {
    TableRectangle rect = new TableRectangle();
    rect.setRect(1, 1, 2, 2);
    StrictBounds b = new StrictBounds(StrictGeomUtility.toInternalValue(100), StrictGeomUtility.toInternalValue(100),
        StrictGeomUtility.toInternalValue(400), StrictGeomUtility.toInternalValue(400));
    ClientAnchor clientAnchor = imageHandler.computeClientAnchor(sheetLayout, rect, b);
    Assert.assertEquals(1, clientAnchor.getCol1());
    Assert.assertEquals(1, clientAnchor.getCol2());
View Full Code Here

  }

  @Test
  public void testImageAligningLeftAndTop()
  {
    TableRectangle rect = new TableRectangle();
    rect.setRect(1, 1, 2, 2);
    StrictBounds b = new StrictBounds(StrictGeomUtility.toInternalValue(100), StrictGeomUtility.toInternalValue(100),
        StrictGeomUtility.toInternalValue(300), StrictGeomUtility.toInternalValue(300));

    ClientAnchor clientAnchor = imageHandler.computeClientAnchor(sheetLayout, rect, b);
    Assert.assertEquals(1, clientAnchor.getCol1());
View Full Code Here

  }

  @Test
  public void testImageAligningMiddle()
  {
    TableRectangle rect = new TableRectangle();
    rect.setRect(1, 1, 2, 2);
    StrictBounds b = new StrictBounds(StrictGeomUtility.toInternalValue(200), StrictGeomUtility.toInternalValue(200),
        StrictGeomUtility.toInternalValue(200), StrictGeomUtility.toInternalValue(200));

    ClientAnchor clientAnchor = imageHandler.computeClientAnchor(sheetLayout, rect, b);
    Assert.assertEquals(1, clientAnchor.getCol1());
View Full Code Here

  }

  @Test
  public void testImageAligningToCellsXLSX()
  {
    TableRectangle rect = new TableRectangle();
    rect.setRect(1, 1, 2, 2);
    StrictBounds b = new StrictBounds(StrictGeomUtility.toInternalValue(100), StrictGeomUtility.toInternalValue(100),
        StrictGeomUtility.toInternalValue(400), StrictGeomUtility.toInternalValue(400));
    ClientAnchor clientAnchor = xlsxImageHandler.computeClientAnchor(sheetLayout, rect, b);
    Assert.assertEquals(1, clientAnchor.getCol1());
    Assert.assertEquals(1, clientAnchor.getCol2());
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.table.base.TableRectangle

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.