Examples of CrosstabOtherGroup


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

    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "crosstab-other-group", attList, XmlWriterSupport.OPEN);

    final CrosstabOtherGroup group = (CrosstabOtherGroup) element;
    if (group.getField() != null)
    {
      xmlWriter.writeTag(BundleNamespaces.LAYOUT, "field", XmlWriterSupport.OPEN);
      xmlWriter.writeTextNormalized(group.getField(), false);
      xmlWriter.writeCloseTag();
    }
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Section) element);
    xmlWriter.writeCloseTag();
View Full Code Here

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

   */
  protected void doneParsing() throws SAXException
  {
    super.doneParsing();

    final CrosstabOtherGroup group = (CrosstabOtherGroup) getElement();
    if (fieldReadHandler != null)
    {
      group.setField(fieldReadHandler.getResult());
    }
    if (headerReadHandler != null)
    {
      group.setHeader((GroupHeader) headerReadHandler.getElement());
    }
    if (footerReadHandler != null)
    {
      group.setFooter((GroupFooter) footerReadHandler.getElement());
    }
    if (groupBodyReadHandler != null)
    {
      group.setBody(groupBodyReadHandler.getGroupBody());
    }
  }
View Full Code Here

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

    }
  }

  protected Element createElement(final String elementType)
  {
    return new CrosstabOtherGroup();
  }
View Full Code Here

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

      {
        continue;
      }

      // create a new group and insert it at the end
      final CrosstabOtherGroup relationalGroup = new CrosstabOtherGroup();
      if (groupDefinition.getGroupName() != null)
      {
        relationalGroup.setName(groupDefinition.getGroupName());
      }
      configureCrosstabOtherGroup(relationalGroup, groupDefinition);
      insertGroup.setBody(new CrosstabOtherGroupBody(relationalGroup));
      insertGroup = relationalGroup;
    }

    for (int i = 0; i < groupDefinitions.length; i++)
    {
      final GroupDefinition groupDefinition = groupDefinitions[i];
      if (GroupType.CT_ROW.equals(groupDefinition.getGroupType()) == false)
      {
        continue;
      }

      // create a new group and insert it at the end
      final CrosstabRowGroup relationalGroup = new CrosstabRowGroup();
      if (groupDefinition.getGroupName() != null)
      {
        relationalGroup.setName(groupDefinition.getGroupName());
      }
      configureCrosstabRowGroup(relationalGroup, groupDefinition);
      insertGroup.setBody(new CrosstabRowGroupBody(relationalGroup));
      insertGroup = relationalGroup;
    }

    for (int i = 0; i < groupDefinitions.length; i++)
    {
      final GroupDefinition groupDefinition = groupDefinitions[i];
      if (GroupType.CT_COLUMN.equals(groupDefinition.getGroupType()) == false)
      {
        continue;
      }

      // create a new group and insert it at the end
      final CrosstabColumnGroup relationalGroup = new CrosstabColumnGroup();
      if (groupDefinition.getGroupName() != null)
      {
        relationalGroup.setName(groupDefinition.getGroupName());
      }
      configureCrosstabColumnGroup(relationalGroup, groupDefinition);
      insertGroup.setBody(new CrosstabColumnGroupBody(relationalGroup));
      insertGroup = relationalGroup;
    }
View Full Code Here

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

      }

      if (body instanceof CrosstabOtherGroupBody)
      {
        final CrosstabOtherGroupBody cogb = (CrosstabOtherGroupBody) body;
        final CrosstabOtherGroup otherGroup = cogb.getGroup();
        if (otherGroup.getField() != null)
        {
          list.add(otherGroup.getField());
        }
        body = otherGroup.getBody();
        continue;
      }

      if (body instanceof CrosstabRowGroupBody)
      {
        final CrosstabRowGroupBody cogb = (CrosstabRowGroupBody) body;
        final CrosstabRowGroup otherGroup = cogb.getGroup();
        if (otherGroup.getField() != null)
        {
          list.add(otherGroup.getField());
        }
        body = otherGroup.getBody();
        continue;
      }

      if (body instanceof CrosstabColumnGroupBody)
      {
        final CrosstabColumnGroupBody cogb = (CrosstabColumnGroupBody) body;
        final CrosstabColumnGroup otherGroup = cogb.getGroup();
        if (otherGroup.getField() != null)
        {
          list.add(otherGroup.getField());
        }
        body = otherGroup.getBody();
        continue;
      }

      break;
    }
View Full Code Here

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

    while (group != null)
    {
      if (group instanceof CrosstabOtherGroup)
      {
        CrosstabOtherGroup otherGroup = (CrosstabOtherGroup) group;
        others.add(otherGroup);
      }
      else if (group instanceof CrosstabRowGroup)
      {
        CrosstabRowGroup rowGroup = (CrosstabRowGroup) group;
View Full Code Here

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

    if (activeContext == null)
    {
      return;
    }

    final CrosstabOtherGroup newGroup = new CrosstabOtherGroup();
    try
    {
      Object selectedElement = null;
      if (getSelectionModel().getSelectionCount() > 0)
      {
        selectedElement = getSelectionModel().getSelectedElement(0);
      }
      if (selectedElement instanceof CrosstabOtherGroup)
      {
        // execution order is important here.
        // first unlink the old root-group by setting a new one ...
        final CrosstabOtherGroup selectedGroup = (CrosstabOtherGroup) selectedElement;
        final GroupBody oldGroupBody = selectedGroup.getBody();
        final CrosstabOtherGroupBody newGroupBody = new CrosstabOtherGroupBody(newGroup);
        selectedGroup.setBody(newGroupBody);
        newGroup.setBody(oldGroupBody);

        activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
            new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
      }
      if (selectedElement instanceof CrosstabGroup)
      {
        final CrosstabGroup selectedGroup = (CrosstabGroup) selectedElement;
        final GroupBody oldGroupBody = selectedGroup.getBody();
        final CrosstabOtherGroupBody newGroupBody = new CrosstabOtherGroupBody(newGroup);
        selectedGroup.setBody(newGroupBody);
        newGroup.setBody(oldGroupBody);

        activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
            new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
      }
    }
    catch (Exception ex)
    {
      UncaughtExceptionsModel.getInstance().addException(ex);
View Full Code Here

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

    {
      predefinedGroups.remove(column, tuple);

      logger.debug(String.format("Preserving existing other group " + column));
      // 1:1 mapping, this should be ok as it is ..
      final CrosstabOtherGroup g = (CrosstabOtherGroup) other.derive(true);
      g.setBody(body);
      return g;
    }
    else
    {
      return super.createOtherGroup(body, column);
View Full Code Here

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

        // Start with the other group and work our way deeper recursively.
        // Note: Other Group is optional.
        if (crosstabGroupBody instanceof CrosstabOtherGroupBody)
        {
          final CrosstabOtherGroup crosstabOtherGroup = ((CrosstabOtherGroupBody)crosstabGroupBody).getGroup();
          buildCrosstabOtherRowGroupBands(crosstabOtherGroup);
        }
        else if (crosstabGroupBody instanceof CrosstabRowGroupBody)
        {
          final CrosstabRowGroupBody crosstabRowGroupBody = (CrosstabRowGroupBody)crosstabGroup.getBody();
View Full Code Here

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

    }

    final AttributeList attList = createMainAttributes(element, xmlWriter);
    xmlWriter.writeTag(BundleNamespaces.LAYOUT, "crosstab-other-group", attList, XmlWriterSupport.OPEN);

    final CrosstabOtherGroup group = (CrosstabOtherGroup) element;
    if (group.getField() != null)
    {
      xmlWriter.writeTag(BundleNamespaces.LAYOUT, "field", XmlWriterSupport.OPEN);
      xmlWriter.writeTextNormalized(group.getField(), false);
      xmlWriter.writeCloseTag();
    }
    writeElementBody(bundle, state, element, xmlWriter);
    writeChildElements(bundle, state, xmlWriter, (Section) element);
    xmlWriter.writeCloseTag();
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.