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

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


          return;
        }
      }
      else if (selectedElement instanceof ReportElement)
      {
        final Section parent = ((ReportElement) selectedElement).getParentSection();
        if (parent instanceof ReportDefinition)
        {
          // prevent the deletion of the top level bands
          setEnabled(false);
          return;
View Full Code Here


      {
        case 0:
          return reportElement.getDataFactory();
        case 1:
        {
          final Section parentSection = reportElement.getParentSection();
          if (parentSection == null)
          {
            throw new IllegalStateException();
          }
          final AbstractReportDefinition reportDefinition =
              (AbstractReportDefinition) parentSection.getReportDefinition();
          return new ParentDataFactoryNode(reportDefinition);
        }
        case 2:
          return getReportFunctionNode();
        case 3:
View Full Code Here

    final ArrayList<Element> retval = new ArrayList<Element>(elements.size());
    for (Element element : elements)
    {
      if (element instanceof Section)
      {
        final Section s = (Section) element;
        if (isParentSection(s, elements))
        {
          continue;
        }
      }
View Full Code Here

        {
          return factoryForQuery;
        }
      }

      final Section parentSection = definition.getParentSection();
      if (parentSection == null)
      {
        definition = null;
      }
      else
      {
        definition = (AbstractReportDefinition) parentSection.getReportDefinition();
      }
    }
    return null;
  }
View Full Code Here

  {
    if (isSubReport() == false)
    {
      return null;
    }
    final Section parentSection = parentReport.getParentSection();
    if (parentSection == null)
    {
      return null;
    }
    final AbstractReportDefinition reportDefinition =
        (AbstractReportDefinition) parentSection.getReportDefinition();
    return new ParentDataFactoryNode(reportDefinition);
  }
View Full Code Here

    {
      throw new IndexOutOfBoundsException();
    }
    if (parent instanceof RootLevelBand)
    {
      final Section re = (Section) parent;
      if (index >= re.getElementCount())
      {
        final int subReportIndex = index - re.getElementCount();
        final RootLevelBand rl = (RootLevelBand) parent;
        return rl.getSubReport(subReportIndex);
      }
    }

    final Section br = (Section) parent;
    if (isStrictOrderNeeded(br))
    {
      return br.getElement(index);
    }
    else
    {
      return br.getElement(br.getElementCount() - index - 1);
    }
  }
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

    if (parent instanceof Section == false)
    {
      return -1;
    }

    final Section br = (Section) parent;
    if (parent instanceof RootLevelBand && child instanceof SubReport)
    {
      final RootLevelBand re = (RootLevelBand) parent;
      final int subreportIndexOf = ModelUtility.findSubreportIndexOf(re, (SubReport) child);
      if (subreportIndexOf != -1)
      {
        return br.getElementCount() + subreportIndexOf;
      }
    }

    if (child instanceof Element == false)
    {
      return -1;
    }

    if (isStrictOrderNeeded(br))
    {
      return ModelUtility.findIndexOf(br, (Element) child);
    }
    else
    {
      return br.getElementCount() - ModelUtility.findIndexOf(br, (Element) child) - 1;
    }
  }
View Full Code Here

        rootElementIds.add(subReport.getObjectID());
      }
    }

    renderableParents = new HashSet<InstanceID>();
    Section parent = section.getParentSection();
    while (parent != null)
    {
      renderableParents.add(parent.getObjectID());
      parent = parent.getParentSection();
    }

    final SelectLayoutNodes layoutNodes = new SelectLayoutNodes();
    this.rootElementBounds = layoutNodes.select(rootElementIds, rootBox, section);
View Full Code Here

      {
        return (RootLevelBand) element;
      }
    }

    final Section section = getElementRenderer().getElement();
    if (section instanceof RootLevelBand)
    {
      return (RootLevelBand) section;
    }
    return null;
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.