Examples of SubGroupBody


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

      bodyElement.setGroup(oldRootGroup.derive(true));
    }

    public void redo(final ReportDocumentContext renderContext)
    {
      final SubGroupBody bodyElement = (SubGroupBody)
          ModelUtility.findElementById(renderContext.getReportDefinition(), target);

      if (bodyElement == null)
      {
        throw new IllegalStateException("Expected to find a sub-group-body on this report.");
      }

      bodyElement.setGroup(newRootGroup.derive(true));
    }
View Full Code Here

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

        // execution order is important here.
        // first unlink the old root-group by setting a new one ...
        final AbstractReportDefinition report = (AbstractReportDefinition) selectedElement;
        final Group rootGroup = report.getRootGroup();

        final SubGroupBody body = new SubGroupBody();
        newGroup.setBody(body);
        report.setRootGroup(newGroup);

        // *then* you can set the old-root to the newly inserted group ..
        body.setGroup(rootGroup);

        activeContext.getUndo().addChange(ActionMessages.getString("InsertGroupAction.UndoName"),
            new InsertGroupOnReportUndoEntry(rootGroup, newGroup));
        return;
      }

      if (selectedElement instanceof RelationalGroup == false)
      {
        return;
      }
      final RelationalGroup selectedGroup = (RelationalGroup) selectedElement;

      final GroupBody bodyElement = selectedGroup.getBody();
      if (bodyElement instanceof SubGroupBody)
      {
        final SubGroupBody subGroupBodyReportElement = (SubGroupBody) bodyElement;
        final Group oldBodyContent = subGroupBodyReportElement.getGroup();

        final SubGroupBody body = new SubGroupBody();
        newGroup.setBody(body);
        subGroupBodyReportElement.setGroup(newGroup);
        body.setGroup(oldBodyContent);

        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

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

    }

    public void redo(final ReportDocumentContext renderContext)
    {
      final AbstractReportDefinition report = renderContext.getReportDefinition();
      final SubGroupBody body = new SubGroupBody();
      newRootGroup.setBody(body);
      report.setRootGroup(newRootGroup);
      body.setGroup(oldRootGroup);
    }
View Full Code Here

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

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

      final SubGroupBody subGroupBodyReportElement = (SubGroupBody) bodyElement;
      subGroupBodyReportElement.setGroup(oldRootGroup);
    }
View Full Code Here

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

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

      final SubGroupBody subGroupBodyReportElement = (SubGroupBody) bodyElement;
      final Group oldBodyContent = subGroupBodyReportElement.getGroup();

      final SubGroupBody body = new SubGroupBody();
      newRootGroup.setBody(body);
      subGroupBodyReportElement.setGroup(newRootGroup);
      body.setGroup(oldBodyContent);
    }
View Full Code Here

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

      final GroupBody bodyElement = selectedGroup.getBody();
      if (bodyElement instanceof SubGroupBody == false)
      {
        throw new IllegalStateException();
      }
      final SubGroupBody sgb = (SubGroupBody) bodyElement;
      final GroupBody maybeDataBody = sgb.getGroup().getBody();
      if (maybeDataBody instanceof GroupDataBody == false)
      {
        throw new IllegalStateException();
      }
View Full Code Here

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

      {
        throw new IllegalStateException();
      }

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

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

      final RelationalGroup selectedGroup = (RelationalGroup) selectedElement;

      final GroupBody bodyElement = selectedGroup.getBody();
      if (bodyElement instanceof SubGroupBody)
      {
        final SubGroupBody subGroupBodyReportElement = (SubGroupBody) bodyElement;
        final Group oldBodyContent = subGroupBodyReportElement.getGroup();

        subGroupBodyReportElement.setGroup(newGroup);

        activeContext.getUndo().addChange(ActionMessages.getString("InsertGroupAction.UndoName"),
            new CrosstabEditSupport.EditGroupOnGroupUndoEntry(selectedGroup.getObjectID(), oldBodyContent, newGroup));
      }
      else if (bodyElement instanceof GroupDataBody)
View Full Code Here

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

      AbstractReportDefinition r = (AbstractReportDefinition) parentSection;
      undo = new CrosstabEditSupport.EditGroupOnReportUndoEntry(r.getRootGroup(), newGroup);
    }
    else if (parentSection instanceof SubGroupBody)
    {
      SubGroupBody b = (SubGroupBody) parentSection;
      undo = new CrosstabEditSupport.EditGroupOnGroupUndoEntry(b.getObjectID(), b.getGroup(), newGroup);
    }
    else
    {
      undo = null;
    }
View Full Code Here

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

        final GroupBody body = g.getBody();
        if (body instanceof SubGroupBody)
        {
          groupCounter += 1;
          final SubGroupBody sgb = (SubGroupBody) body;
          g = sgb.getGroup();
        }
        else if (body instanceof CrosstabOtherGroupBody)
        {
          groupCounter += 1;
          final CrosstabOtherGroupBody sgb = (CrosstabOtherGroupBody) body;
          g = sgb.getGroup();
        }
        else
        {
          break;
        }
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.