Examples of ReportElement


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

  private static void findSubReportsInteral(final Section section, final ArrayList<SubReport> result)
  {
    final int count = section.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = section.getElement(i);
      if (element instanceof Section)
      {
        findSubReportsInteral((Section) element, result);
      }
    }
View Full Code Here

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

  public static int findIndexOf(final Section parent, final Element visualElement)
  {
    final int count = parent.getElementCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = parent.getElement(i);
      if (element == visualElement)
      {
        return i;
      }
    }
View Full Code Here

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

  public static int findSubreportIndexOf(final RootLevelBand parent, final SubReport visualElement)
  {
    final int count = parent.getSubReportCount();
    for (int i = 0; i < count; i++)
    {
      final ReportElement element = parent.getSubReport(i);
      if (element == visualElement)
      {
        return i;
      }
    }
View Full Code Here

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

      return;
    }

    // This is an attribute change event ... see if it is one we are concerned about
    final AttributeChange attributeChange = (AttributeChange) event.getParameter();
    final ReportElement reportElement = (ReportElement) event.getElement();
    final AttributeMetaData attributeDescription = reportElement.getMetaData().getAttributeDescription(attributeChange.getNamespace(), attributeChange.getName());
    if (attributeDescription == null ||
        AttributeMetaData.VALUEROLE_RESOURCE.equals(attributeDescription.getValueRole()) == false)
    {
      return;
    }

    // See if we need to load the resource's value into the resource key
    final Object newValue = attributeChange.getNewValue();
    if (newValue instanceof ResourceKey && shouldBeLoaded((ResourceKey) newValue))
    {
      try
      {
        // Embed the file and swap in the key which refers to the embedded resource
        final ResourceKey newKey = loadResourceIntoKey((ResourceKey) newValue);
        if (newKey != null)
        {
          // Swap out the old key with the new key (the new key has the resource loaded)
          reportElement.setAttribute(attributeChange.getNamespace(), attributeChange.getName(), newKey);
        }
      }
      catch (Exception e)
      {
        reportElement.setAttribute(attributeChange.getNamespace(), attributeChange.getName(), null);
        UncaughtExceptionsModel.getInstance().addException(e);
      }
    }
  }
View Full Code Here

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

      {
        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)
        {
          final SelectionOverlayInformation renderer = new SelectionOverlayInformation(velement);
          renderer.validate(zoomModel.getZoomAsPercentage());
          velement.setAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, ReportDesignerBoot.SELECTION_OVERLAY_INFORMATION, renderer, false);
          repaintConditionally();
          return;
        }
        parentSearch = parentSearch.getParentSection();
      }
    }
View Full Code Here

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

    {
      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

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

    return new EditGroupsUndoEntry(entries, changedEntries);
  }

  protected UndoEntry moveVisualElement(final AbstractReportDefinition report, final Element element)
  {
    final ReportElement reportElement = element.getParentSection();
    if (reportElement instanceof Band == false)
    {
      return null;
    }
View Full Code Here

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

    return new EditGroupsUndoEntry(entries, changedEntries);
  }

  protected UndoEntry moveVisualElement(final AbstractReportDefinition report, final Element element)
  {
    final ReportElement reportElement = element.getParentSection();
    if (reportElement instanceof Band == false)
    {
      return null;
    }
View Full Code Here

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

    this.visualElements = visualElements.toArray(new ReportElement[visualElements.size()]);
    this.styleProperties = new Object[visualElements.size()][];

    for (int i = 0; i < visualElements.size(); i++)
    {
      final ReportElement visualElement = visualElements.get(i);
      styleProperties[i] = computeStyleChangeSet(visualElement);
    }
  }
View Full Code Here

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

  {
    final Object[][] currentStyle = new Object[visualElements.length][];
    final InstanceID[] targets = new InstanceID[visualElements.length];
    for (int i = 0; i < visualElements.length; i++)
    {
      final ReportElement visualElement = visualElements[i];
      currentStyle[i] = computeStyleChangeSet(visualElement);
      targets[i] = visualElement.getObjectID();
    }
    return new MassElementStyleUndoEntry(targets, styleProperties, currentStyle);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.