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

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


      }
    }

    if (rootLevelBand instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand arb = (AbstractRootLevelBand) rootLevelBand;

      for (int i = 0; i < subreports.size(); i++)
      {
        final SubreportElementReadHandler readHandler = (SubreportElementReadHandler) subreports.get(i);
        final SubReport subReport = (SubReport) readHandler.getObject();
        arb.addSubReport(subReport);
      }
    }

    if (verticalLinealModel != null)
    {
View Full Code Here


  {
    super.doneParsing();
    final Element band = getElement();
    if (band instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand arlb = (AbstractRootLevelBand) band;
      for (int i = 0; i < subReportHandlers.size(); i++)
      {
        final IncludeSubReportReadHandler handler =
            (IncludeSubReportReadHandler) subReportHandlers.get(i);
        arlb.addSubReport((SubReport) handler.getObject());
      }
    }
  }
View Full Code Here

  {
    super.doneParsing();
    final Band band = getBand();
    if (band instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand arlb = (AbstractRootLevelBand) band;
      for (int i = 0; i < subReportHandlers.size(); i++)
      {
        final IncludeSubReportReadHandler handler =
            (IncludeSubReportReadHandler) subReportHandlers.get(i);
        arlb.addSubReport((SubReport) handler.getObject());
      }
    }
  }
View Full Code Here

          final Object subreportHint = insert.getAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, SUBREPORT_BANDED_HINT);
          if (Boolean.TRUE.equals(subreportHint))
          {
            if (target instanceof AbstractRootLevelBand)
            {
              final AbstractRootLevelBand rlb = (AbstractRootLevelBand) target;
              rlb.addSubReport((SubReport) element);
              return element;
            }
            else
            {
              return false;
View Full Code Here

    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)
    {
View Full Code Here

      return null;
    }

    if (element instanceof SubReport && reportElement instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
      final int count = re.getSubReportCount();
      for (int i = 1; i < count; i++)
      {
        final SubReport sr = re.getSubReport(i);
        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(0, sr);

          return new CompoundUndoEntry
                  (new BandedSubreportEditUndoEntry(re.getObjectID(), i, sr, null),
                          new BandedSubreportEditUndoEntry(re.getObjectID(), 0, null, sr));
        }
      }
    }

    final Band parentBand = (Band) reportElement;
View Full Code Here

    }

    if (element instanceof SubReport &&
        reportElement instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
      final int count = re.getSubReportCount();
      for (int i = 1; i < count; i++)
      {
        final SubReport sr = re.getSubReport(i);
        if (sr == element)
        {
          re.removeSubreport(sr);
          re.addSubReport(i - 1, sr);

          return new CompoundUndoEntry
              (new BandedSubreportEditUndoEntry(re.getObjectID(), i, sr, null),
                  new BandedSubreportEditUndoEntry(re.getObjectID(), i - 1, null, sr));
        }
      }
    }

    final Band parentBand = (Band) reportElement;
View Full Code Here

    this.newElement = newElement;
  }

  public void undo(final ReportDocumentContext renderContext)
  {
    final AbstractRootLevelBand elementById = (AbstractRootLevelBand)
        ModelUtility.findElementById(renderContext.getReportDefinition(), target);
    if (newElement != null)
    {
      elementById.removeSubreport(newElement);
    }
    if (oldElement != null)
    {
      elementById.addSubReport(position, oldElement);
    }
  }
View Full Code Here

    }
  }

  public void redo(final ReportDocumentContext renderContext)
  {
    final AbstractRootLevelBand elementById = (AbstractRootLevelBand)
        ModelUtility.findElementById(renderContext.getReportDefinition(), target);
    if (oldElement != null)
    {
      elementById.removeSubreport(oldElement);
    }
    if (newElement != null)
    {
      elementById.addSubReport(position, newElement);
    }
  }
View Full Code Here

              new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
          parent.addElement(subReport);
        }
        else
        {
          final AbstractRootLevelBand arb = (AbstractRootLevelBand) parent;

          final ReportDocumentContext context = dragContext.getRenderContext();
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getString("SubreportReportElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
View Full Code Here

TOP

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

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.