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

Examples of org.pentaho.reporting.engine.classic.core.GroupDataBody


      if (bodyElement instanceof GroupDataBody == false)
      {
        throw new IllegalStateException();
      }

      final GroupDataBody oldBody = (GroupDataBody) bodyElement;
      selectedGroup.setBody(new SubGroupBody(newGroup));
      newGroup.setBody(oldBody);
    }
View Full Code Here


      return null;
    }

    if (rawLeadSelection instanceof GroupDataBody)
    {
      final GroupDataBody body = (GroupDataBody) rawLeadSelection;
      if (insert instanceof DetailsHeader)
      {
        final DetailsHeader detailsHeader = (DetailsHeader) insert.derive();
        body.setDetailsHeader(detailsHeader);
        return detailsHeader;
      }
      if (insert instanceof DetailsFooter)
      {
        final DetailsFooter footer = (DetailsFooter) insert.derive();
        body.setDetailsFooter(footer);
        return footer;
      }
      if (insert instanceof ItemBand)
      {
        final ItemBand itemBand = (ItemBand) insert.derive();
        body.setItemBand(itemBand);
        return itemBand;
      }
      if (insert instanceof NoDataBand)
      {
        final NoDataBand noDataBand = (NoDataBand) insert.derive();
        body.setNoDataBand(noDataBand);
        return noDataBand;
      }
      return null;
    }

    if (rawLeadSelection instanceof CrosstabCellBody)
    {
      final CrosstabCellBody body = (CrosstabCellBody) rawLeadSelection;
      if (insert instanceof CrosstabCell)
      {
        final CrosstabCell crosstabCell = (CrosstabCell) insert.derive();
        body.addElement(crosstabCell);
        return crosstabCell;
      }
    }

    return null;
View Full Code Here

      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
    }

    if (data instanceof ItemBand)
    {
      final GroupDataBody g = (GroupDataBody) parent;
      final ItemBand oldBand = g.getItemBand();
      final ItemBand newBand = new ItemBand();
      g.setItemBand(newBand);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newBand), oldBand, newBand);
    }
    if (data instanceof NoDataBand)
    {
      final GroupDataBody g = (GroupDataBody) parent;
      final NoDataBand oldBand = g.getNoDataBand();
      final NoDataBand newBand = new NoDataBand();
      g.setNoDataBand(newBand);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newBand), oldBand, newBand);
    }
    if (data instanceof DetailsHeader)
    {
      final GroupDataBody g = (GroupDataBody) parent;
      final DetailsHeader oldHeader = g.getDetailsHeader();
      final DetailsHeader newHeader = new DetailsHeader();
      g.setDetailsHeader(newHeader);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
    }
    if (data instanceof DetailsFooter)
    {
      final GroupDataBody g = (GroupDataBody) parent;
      final DetailsFooter oldFooter = g.getDetailsFooter();
      final DetailsFooter newFooter = new DetailsFooter();
      g.setDetailsFooter(newFooter);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
    }
    return null;

  }
View Full Code Here

    final GroupBody subgroup = (GroupBody) data;
    final RelationalGroup parent = (RelationalGroup) subgroup.getParentSection();
    if (parent != null)
    {
      final GroupBody body = parent.getBody();
      final GroupDataBody newBody = new GroupDataBody();
      parent.setBody(newBody);
      return new SectionEditUndoEntry
          (parent.getObjectID(), ModelUtility.findIndexOf(parent, newBody), body, newBody);
    }
    return null;
View Full Code Here

      }
      else if (bodyElement instanceof GroupDataBody)
      {
        // we cannot simply insert the group-data body into the crosstab. We need to locate the
        // innermost group and need to place the body there.
        final GroupDataBody oldBody = CrosstabEditSupport.installCrosstabIntoLastGroup(selectedGroup, newGroup);
        getActiveContext().getUndo().addChange(ActionMessages.getString("InsertGroupAction.UndoName"),
            new InsertGroupOnDetailsUndoEntry(selectedGroup.getObjectID(), newGroup, oldBody));

      }
    }
View Full Code Here

    report.setReportHeader(createReportHeader());
    report.setPageFooter(createPageFooter());
    report.setPageHeader(createPageHeader());
    report.addGroup(createContinentGroup());

    final GroupDataBody dataBody = (GroupDataBody) report.getChildElementByType(GroupDataBodyType.INSTANCE);
    dataBody.setItemBand(createItemBand());
   
    report.setExpressions(createFunctions());
    report.getReportConfiguration().setConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.Encoding", "Identity-H");
    report.setDataFactory(new TableDataFactory
View Full Code Here

    writeRootBand(ReportDescriptionWriter.PAGE_HEADER_TAG, getReport().getPageHeader());
    writeRootBand(ReportDescriptionWriter.PAGE_FOOTER_TAG, getReport().getPageFooter());
    writeRootBand(ReportDescriptionWriter.WATERMARK_TAG, getReport().getWatermark());
    writeGroups();

    final GroupDataBody dataBody = (GroupDataBody) getReport().getChildElementByType(GroupDataBodyType.INSTANCE);
    if (dataBody != null)
    {
      writeRootBand(ReportDescriptionWriter.ITEMBAND_TAG, dataBody.getItemBand());
      writeRootBand(ReportDescriptionWriter.NO_DATA_BAND_TAG, dataBody.getNoDataBand());
    }

    writer.writeCloseTag();
  }
View Full Code Here

    super("group-data-body", true);
  }

  public ReportElement create()
  {
    return new GroupDataBody();
  }
View Full Code Here

    {
      group.setBody(cellBodyReadHandler.getElement());
    }
    else
    {
      final GroupDataBody element = groupBodyReadHandler.getElement();
      final ItemBand itemBand = element.getItemBand();
      final CrosstabCell cell = new CrosstabCell();
      itemBand.copyInto(cell);
      cell.addElements(Arrays.asList(itemBand.getElementArray()));

      final CrosstabCellBody body = new CrosstabCellBody();
View Full Code Here

   * @throws SAXException if there is a parsing error.
   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    final GroupDataBody body = getElement();
    if (noDataBandReadHandler != null)
    {
      body.setNoDataBand(noDataBandReadHandler.getElement());
    }
    if (itemBandReadHandler != null)
    {
      body.setItemBand(itemBandReadHandler.getElement());
    }
    if (detailsFooterBandReadHandler != null)
    {
      body.setDetailsFooter(detailsFooterBandReadHandler.getElement());
    }
    if (detailsHeaderBandReadHandler != null)
    {
      body.setDetailsHeader(detailsHeaderBandReadHandler.getElement());
    }
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.GroupDataBody

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.