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

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


    final String[] columnNames = activeContext.getReportDataSchemaModel().getColumnNames();
    importInnerTableCellEditor.setTags(columnNames);
    exportInnerTableCellEditor.setTags(columnNames);

    final Section parentSection = activeContext.getReportDefinition().getParentSection();
    if (parentSection == null)
    {
      return;
    }
    final ReportDefinition parentReport = parentSection.getReportDefinition();
    if (parentReport == null)
    {
      return;
    }
View Full Code Here


        return;
      }

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

        final Object insertResult = InsertationUtil.insert(rawLeadSelection, report, o);
        selectedElements[i] = insertResult;
        if (insertResult instanceof Element)
        {
          final Element insertElement = (Element) insertResult;
          final Section parent = insertElement.getParentSection();
          if (parent == null)
          {
            throw new IllegalStateException("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("A newly inserted section must have a position within its parent.");
              }
              else
              {
                undos.add(new BandedSubreportEditUndoEntry(parent.getObjectID(), arb.getSubReportCount(), null, subReport));
              }
            }
            else
            {
              throw new IllegalStateException("A newly inserted section must have a position within its parent.");
            }
          }
          else
          {
            undos.add(new ElementEditUndoEntry(parent.getObjectID(), position, null, insertElement));
          }
        }
        else if (insertResult instanceof Expression)
        {
          final Expression insertExpression = (Expression) insertResult;
View Full Code Here

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

      {
        return;
      }

      final ReportElement reportElement = (ReportElement) element;
      final Section band = getRendererRoot().getElement();
      if (ModelUtility.isDescendant(band, reportElement))
      {
        rendererRoot.resetBounds();
        CrosstabRenderComponent.this.revalidate();
        CrosstabRenderComponent.this.repaint();
        return;
      }

      if (reportElement instanceof Section)
      {
        final Section section = (Section) reportElement;
        if (ModelUtility.isDescendant(section, band))
        {
          rendererRoot.resetBounds();
          CrosstabRenderComponent.this.revalidate();
          CrosstabRenderComponent.this.repaint();
View Full Code Here

  public Object getChild(final Object parent, final int index)
  {
    if (parent instanceof RootLevelBand && parent instanceof Section)
    {
      final Section re = (Section) parent;
      if (index < re.getElementCount())
      {
        return re.getElement(re.getElementCount() - index - 1);
      }
      final int subReportIndex = index - re.getElementCount();
      final RootLevelBand rl = (RootLevelBand) parent;
      return rl.getSubReport(subReportIndex);
    }
    if (parent instanceof Section)
    {
      final Section br = (Section) parent;
      if (isStrictOrderNeeded(br))
      {
        return br.getElement(index);
      }
      else
      {
        return br.getElement(br.getElementCount() - index - 1);
      }
    }

    throw new IndexOutOfBoundsException();
  }
View Full Code Here

      return 0;
    }
    if (parent instanceof RootLevelBand && parent instanceof Section)
    {
      final RootLevelBand re = (RootLevelBand) parent;
      final Section se = (Section) parent;
      return re.getSubReportCount() + se.getElementCount();
    }
    if (parent instanceof Section)
    {
      final Section br = (Section) parent;
      return br.getElementCount();
    }
    return 0;
  }
View Full Code Here

      final RootLevelBand re = (RootLevelBand) parent;
      return ModelUtility.findSubreportIndexOf(re, (SubReport) child);
    }
    if (parent instanceof Section && child instanceof Element)
    {
      final Section br = (Section) parent;
      if (isStrictOrderNeeded(br))
      {
        return ModelUtility.findIndexOf(br, (Element) child);
      }
      else
      {
        return br.getElementCount() - ModelUtility.findIndexOf(br, (Element) child) - 1
      }
    }

    return -1;
  }
View Full Code Here

        return o;
      }
      if (o instanceof ReportElement)
      {
        final ReportElement element = (ReportElement) o;
        final Section parentSection = element.getParentSection();
        if (parentSection instanceof Band)
        {
          return parentSection;
        }
      }
View Full Code Here

    {
      return null;
    }

    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);
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.