Examples of SubGroupBody


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

      final GroupBody body = existingGroup.getBody();
      if (body instanceof SubGroupBody == false)
      {
        return retval;
      }
      final SubGroupBody sgb = (SubGroupBody) body;
      existingGroup = sgb.getGroup();
    }

    return retval;
  }
View Full Code Here

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

  {
    Group existingGroup = definition.getRootGroup();
    GroupBody gb = existingGroup.getBody();
    while (gb instanceof SubGroupBody)
    {
      final SubGroupBody sgb = (SubGroupBody) gb;
      existingGroup = sgb.getGroup();
      gb = existingGroup.getBody();
    }
    existingGroup.setBody(new SubGroupBody(crosstabGroup));
  }
View Full Code Here

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

    }

    GroupBody gb = existingGroup.getBody();
    while (gb instanceof SubGroupBody)
    {
      final SubGroupBody sgb = (SubGroupBody) gb;
      existingGroup = sgb.getGroup();
      if (existingGroup instanceof CrosstabGroup)
      {
        return (CrosstabGroup) existingGroup;
      }
      gb = existingGroup.getBody();
View Full Code Here

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

      if (insertGroup instanceof RelationalGroup == false)
      {
        if (lastGroup == null)
        {
          definition.setRootGroup(group);
          group.setBody(new SubGroupBody(insertGroup));
          return;
        }

        final GroupBody body = lastGroup.getBody();
        final SubGroupBody sgb = new SubGroupBody(group);
        lastGroup.setBody(sgb);
        group.setBody(body);
        return;
      }

      final GroupBody body = insertGroup.getBody();
      if (body instanceof SubGroupBody == false)
      {
        final SubGroupBody sgb = new SubGroupBody(group);
        insertGroup.setBody(sgb);
        group.setBody(body);
        return;
      }

      lastGroup = insertGroup;
      final SubGroupBody sgb = (SubGroupBody) body;
      insertGroup = sgb.getGroup();
    }
  }
View Full Code Here

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

    final int count = masterReport.getGroupCount();
    assertEquals(groupDefs.length + 2, count);
    final RelationalGroup defaultGroup = (RelationalGroup) masterReport.getRootGroup();
    assertEquals("Default-Group detector", 0, defaultGroup.getFieldsArray().length);
    final SubGroupBody body = (SubGroupBody) defaultGroup.getBody();
    final RelationalGroup group1 = (RelationalGroup) body.getGroup();
    assertEquals("Rel-Group", "group-field1", group1.getFieldsArray()[0]);
    final SubGroupBody body1 = (SubGroupBody) group1.getBody();
    final CrosstabGroup ctGroup = (CrosstabGroup) body1.getGroup();
    final CrosstabRowGroupBody body2 = (CrosstabRowGroupBody) ctGroup.getBody();
    final CrosstabRowGroup rowGroup = body2.getGroup();
    assertEquals("Row-Group", "group-field2", rowGroup.getField());

    final CrosstabColumnGroupBody body3 = (CrosstabColumnGroupBody) rowGroup.getBody();
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 ReportRenderContext 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
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.