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

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


      return null;
    }

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

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

    final int count = reportElement.getElementCount() - 1;
View Full Code Here


      return null;
    }

    if (element instanceof SubReport && reportElement instanceof AbstractRootLevelBand)
    {
      final AbstractRootLevelBand re = (AbstractRootLevelBand) reportElement;
      final int count = re.getSubReportCount() - 1;
      for (int i = 0; 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 int count = reportElement.getElementCount() - 1;
View Full Code Here

              new ElementEditUndoEntry(parent.getObjectID(), parent.getElementCount(), null, subReport));
          parent.addElement(subReport);
        }
        else
        {
          final AbstractRootLevelBand arb = (AbstractRootLevelBand) parent;
          final UndoManager undo = context.getUndo();
          undo.addChange(Messages.getString("CrosstabReportElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
      {
        final UndoManager undo = context.getUndo();
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

  {
    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

              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.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
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.getInstance().getString("TocElementDragHandler.UndoEntry"),
              new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
          arb.addSubReport(subReport);
        }
      }
      else
      {
        final ReportDocumentContext context = dragContext.getRenderContext();
View Full Code Here

      }
    }

    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

        final Section parentSection = realOriginal.getParentSection();

        if (parentSection instanceof AbstractRootLevelBand)
        {
          final AbstractRootLevelBand rlb = (AbstractRootLevelBand) parentSection;
          final SubReport[] reports = rlb.getSubReports();
          for (int i = 0; i < reports.length; i++)
          {
            final SubReport report = reports[i];
            if (report == realOriginal)
            {
              rlb.removeSubreport(report);
              rlb.addSubReport(i, (SubReport) def);
              return;
            }
          }
        }
View Full Code Here

        final Section parentSection = realOriginal.getParentSection();

        if (parentSection instanceof AbstractRootLevelBand)
        {
          final AbstractRootLevelBand rlb = (AbstractRootLevelBand) parentSection;
          final SubReport[] reports = rlb.getSubReports();
          for (int i = 0; i < reports.length; i++)
          {
            final SubReport report = reports[i];
            if (report == realOriginal)
            {
              rlb.removeSubreport(report);
              rlb.addSubReport(i, (SubReport) def);
              return;
            }
          }
        }
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.