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

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


    if (parentContext.isBandedContext() == false)
    {
      return false;
    }

    final Section parentSection = reportDefinition.getParentSection();
    if (parentSection instanceof RootLevelBand == false)
    {
      return false;
    }
View Full Code Here


        final String[] queryNames = dataFactory.getQueryNames();
        names.addAll(Arrays.asList(queryNames));
      }
      if (definition instanceof SubReport)
      {
        final Section parentSection = definition.getParentSection();
        definition = (AbstractReportDefinition) parentSection.getReportDefinition();
      }
      else
      {
        definition = null;
      }
View Full Code Here

        return;
      }

      final Element velement = (Element) element;
      ReportElement parentSearch = velement;
      final Section rootBand = getElementRenderer().getElement();
      final ZoomModel zoomModel = getRenderContext().getZoomModel();
      while (parentSearch != null)
      {
        if (parentSearch == rootBand)
        {
View Full Code Here

    {
      return;
    }
    if (element instanceof Section)
    {
      final Section section = (Section) element;
      final int count = section.getElementCount();
      for (int i = 0; i < count; i++)
      {
        final ReportElement e = section.getElement(i);
        if (e instanceof Element)
        {
          draw((Element) e, graphics2D);
        }
      }
View Full Code Here

      list.repaint();
    }
    else if (owner instanceof RootBandRenderComponent)
    {
      final RootBandRenderComponent rc = (RootBandRenderComponent) owner;
      final Section reportElement = rc.getRendererRoot().getElement();
      final DocumentContextSelectionModel selectionModel = getActiveContext().getSelectionModel();
      selectRecursively(selectionModel, reportElement);
      if (reportElement instanceof RootLevelBand)
      {
        final RootLevelBand re = (RootLevelBand) reportElement;
View Full Code Here

    }
  }

  private UndoEntry handleInsertElement(final Element insertElement)
  {
    final Section parent = insertElement.getParentSection();
    if (parent == null)
    {
      throw new IllegalStateException("Assert Failed: A newly inserted section must have a parent."); // NON-NLS
    }
    final int position = ModelUtility.findIndexOf(parent, insertElement);
    if (position == -1)
    {
      if (insertElement instanceof SubReport && parent instanceof RootLevelBand)
      {
        final SubReport subReport = (SubReport) insertElement;
        final RootLevelBand arb = (RootLevelBand) parent;
        final int subreportPosition = ModelUtility.findSubreportIndexOf(arb, subReport);
        if (subreportPosition == -1)
        {
          throw new IllegalStateException
              ("Assert Failed: A newly inserted section must have a position within its parent.");
        }
        else
        {
          return new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport);
        }
      }
      else
      {
        throw new IllegalStateException("A newly inserted section must have a position within its parent.");
      }
    }
    else
    {
      return new ElementEditUndoEntry(parent.getObjectID(), position, null, insertElement);
    }
  }
View Full Code Here

    this.newElement = newElement;
  }

  public void undo(final ReportDocumentContext renderContext)
  {
    final Section elementById = (Section)
        ModelUtility.findElementById(renderContext.getReportDefinition(), target);
    elementById.setElementAt(position, oldElement);
  }
View Full Code Here

    elementById.setElementAt(position, oldElement);
  }

  public void redo(final ReportDocumentContext renderContext)
  {
    final Section elementById = (Section)
        ModelUtility.findElementById(renderContext.getReportDefinition(), target);
    elementById.setElementAt(position, newElement);
  }
View Full Code Here

  }

  private ReportDocumentContext findParentContext(final ReportDesignerContext context)
  {
    final ReportDocumentContext activeContext = context.getActiveContext();
    final Section parentSection = activeContext.getReportDefinition().getParentSection();
    if (parentSection == null)
    {
      return null;
    }
    final ReportDefinition parentReport = parentSection.getReportDefinition();
    if (parentReport == null)
    {
      return null;
    }
View Full Code Here

  }

  protected UndoEntry createUndoEntry(final CrosstabGroup selectedCrosstab, final CrosstabGroup newGroup)
  {
    UndoEntry undo;
    Section parentSection = selectedCrosstab.getParentSection();
    if (parentSection instanceof AbstractReportDefinition)
    {
      AbstractReportDefinition r = (AbstractReportDefinition) parentSection;
      undo = new CrosstabEditSupport.EditGroupOnReportUndoEntry(r.getRootGroup(), newGroup);
    }
View Full Code Here

TOP

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

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.