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

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


        getRootHandler().getHelperObject(ReportParserUtil.HELPER_OBJ_REPORT_NAME);


    if (groupReadHandler != null)
    {
      final GroupDataBody dataBody = (GroupDataBody) report.getChildElementByType(GroupDataBodyType.INSTANCE);
      final ItemBand itemBand = dataBody.getItemBand();
      final NoDataBand noDataBand = dataBody.getNoDataBand();
      final DetailsFooter detailsFooter = dataBody.getDetailsFooter();
      final DetailsHeader detailsHeader = dataBody.getDetailsHeader();

      report.setRootGroup(groupReadHandler.getGroup());

      final GroupDataBody newDataBody = (GroupDataBody) report.getChildElementByType(GroupDataBodyType.INSTANCE);
      newDataBody.setItemBand(itemBand);
      newDataBody.setNoDataBand(noDataBand);
      newDataBody.setDetailsFooter(detailsFooter);
      newDataBody.setDetailsHeader(detailsHeader);
    }
  }
View Full Code Here


      subGroupBody.setGroup(groupReadHandler.getGroup());
      group.setBody(subGroupBody);
    }
    else
    {
      group.setBody(new GroupDataBody());
    }

    this.group = group;
  }
View Full Code Here

        activeContext.getUndo().addChange(ActionMessages.getString("InsertGroupAction.UndoName"),
            new InsertGroupOnGroupUndoEntry(selectedGroup.getObjectID(), oldBodyContent, newGroup));
      }
      else if (bodyElement instanceof GroupDataBody)
      {
        final GroupDataBody oldBody = (GroupDataBody) bodyElement;
        selectedGroup.setBody(new SubGroupBody(newGroup));
        newGroup.setBody(oldBody);
        activeContext.getUndo().addChange(ActionMessages.getString("InsertGroupAction.UndoName"),
            new InsertGroupOnDetailsUndoEntry(selectedGroup.getObjectID(), newGroup));
      }
View Full Code Here

      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;
      try
      {
        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;
        }
      }
      catch (CloneNotSupportedException cne)
      {
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;
    }

    if (data instanceof Group)
    {
      return performDeleteGroup((Group) data);

    }

    if (data instanceof Element == false)
    {
      return null;
    }

    final Element veElement = (Element) data;
    final Section parent = veElement.getParentSection();
    if (data instanceof SubReport && parent instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) parent;
      final SubReport report = (SubReport) data;
      final int index = ModelUtility.findSubreportIndexOf(re, report);
      if (index != -1)
      {
        re.removeSubreport(report);
      }
      if (veElement.getParent() == null)
      {
        // remove was a success ...
        return new BandedSubreportEditUndoEntry(re.getObjectID(), index, report, null);
      }
    }

    if (parent instanceof Band)
    {
      final Band band = (Band) parent;
      final int index = ModelUtility.findIndexOf(band, veElement);
      band.removeElement(veElement);
      return new ElementEditUndoEntry(band.getObjectID(), index, veElement, null);
    }

    if (data instanceof GroupHeader)
    {
      final Group g = (Group) parent;
      final GroupHeader oldHeader = g.getHeader();
      final GroupHeader newHeader = new GroupHeader();
      g.setHeader(newHeader);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
    }
    if (data instanceof GroupFooter)
    {
      final Group g = (Group) parent;
      final GroupFooter oldFooter = g.getFooter();
      final GroupFooter newFooter = new GroupFooter();
      g.setFooter(newFooter);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
    }
    if (data instanceof ReportFooter)
    {
      final AbstractReportDefinition g = (AbstractReportDefinition) parent;
      final ReportFooter oldFooter = g.getReportFooter();
      final ReportFooter newFooter = new ReportFooter();
      g.setReportFooter(newFooter);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newFooter), oldFooter, newFooter);
    }
    if (data instanceof ReportHeader)
    {
      final AbstractReportDefinition g = (AbstractReportDefinition) parent;
      final ReportHeader oldHeader = g.getReportHeader();
      final ReportHeader newHeader = new ReportHeader();
      g.setReportHeader(newHeader);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
    }
    if (data instanceof PageHeader)
    {
      final AbstractReportDefinition g = (AbstractReportDefinition) parent;
      final PageHeader oldHeader = g.getPageHeader();
      final PageHeader newHeader = new PageHeader();
      g.setPageHeader(newHeader);
      return new SectionEditUndoEntry(g.getObjectID(), ModelUtility.findIndexOf(g, newHeader), oldHeader, newHeader);
    }
    if (data instanceof PageFooter)
    {
      final AbstractReportDefinition g = (AbstractReportDefinition) parent;
      final PageFooter oldFooter = g.getPageFooter();
      final PageFooter newFooter = new PageFooter();
      g.setPageFooter(newFooter);
      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

        rootBandComponents.add(new RootBandRenderer(group.getHeader(), renderContext, layoutingContext));
      }
      final Element bodyElement = group.getBody();
      if (bodyElement instanceof GroupDataBody)
      {
        final GroupDataBody body = (GroupDataBody) bodyElement;
        if (ModelUtility.isHideInLayoutGui(body.getDetailsHeader()) == false)
        {
          rootBandComponents.add(new RootBandRenderer(body.getDetailsHeader(), renderContext, layoutingContext));
        }
        if (ModelUtility.isHideInLayoutGui(body.getNoDataBand()) == false)
        {
          rootBandComponents.add(new RootBandRenderer(body.getNoDataBand(), renderContext, layoutingContext));
        }
        if (ModelUtility.isHideInLayoutGui(body.getItemBand()) == false)
        {
          rootBandComponents.add(new RootBandRenderer(body.getItemBand(), renderContext, layoutingContext));
        }
        if (ModelUtility.isHideInLayoutGui(body.getDetailsFooter()) == false)
        {
          rootBandComponents.add(new RootBandRenderer(body.getDetailsFooter(), renderContext, layoutingContext));
        }
        break;
      }
      else if (bodyElement instanceof CrosstabRowGroupBody)
      {
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.