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

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


  }

  private static TreePath getBasePathForNode(final Element node, final AbstractReportDefinition stopOnReport)
  {
    final ArrayList<ReportElement> list = new ArrayList<ReportElement>();
    ReportElement re = node;
    while (re != null)
    {
      list.add(re);
      if (re == stopOnReport)
      {
        break;
      }

      re = re.getParentSection();
    }
    final Object[] data = new Object[list.size()];
    for (int i = 0; i < list.size(); i++)
    {
      final ReportElement element = list.get(i);
      data[data.length - 1 - i] = element;
    }

    return new TreePath(data);
  }
View Full Code Here

    boolean changed = false;
    final ReportElement[] elements = getAttributeDataBackend().getData();
    final ArrayList<UndoEntry> undos = new ArrayList<UndoEntry>();
    for (int i = 0; i < elements.length; i++)
    {
      final ReportElement element = elements[i];
      final Object attribute = element.getAttribute(metaData.getNameSpace(), metaData.getName());
      if ((ObjectUtilities.equal(attribute, value)) == false)
      {
        undos.add(new AttributeEditUndoEntry
            (element.getObjectID(), metaData.getNameSpace(), metaData.getName(), attribute, value));
        element.setAttribute(metaData.getNameSpace(), metaData.getName(), value);
        changed = true;
      }
    }
    undo.addChange(Messages.getString("AttributeTableModel.UndoName"),
        new CompoundUndoEntry((UndoEntry[]) undos.toArray(new UndoEntry[undos.size()])));
View Full Code Here

    Object lastElement = null;
    final ReportElement[] elements = dataBackend.getData();
    if (elements.length > 0)
    {
      final ReportElement element = elements[0];
      lastElement = element.getAttribute(metaData.getNameSpace(), metaData.getName());
    }
    if (lastElement != null)
    {
      fullValues[row] = lastElement;
    }
View Full Code Here

  {
    final AttributeMap attributes = new AttributeMap();
    final ArrayList<AttributeMetaData> selectedArrays = new ArrayList<AttributeMetaData>();
    for (int elementCount = 0; elementCount < elements.length; elementCount++)
    {
      final ReportElement element = elements[elementCount];
      final AttributeMetaData[] datas = element.getMetaData().getAttributeDescriptions();
      for (int j = 0; j < datas.length; j++)
      {
        final AttributeMetaData data = datas[j];

        final String name = data.getName();
View Full Code Here

  private void iterateSection(final Section s)
  {
    final int elementCount = s.getElementCount();
    for (int i = 0; i < elementCount; i++)
    {
      final ReportElement e = s.getElement(i);
      if (e instanceof SubReport)
      {
        continue;
      }
      if (e instanceof RootLevelBand)
      {
        final CachedLayoutData layoutData = ModelUtility.getCachedLayoutData((Element) e);
        final double height = StrictGeomUtility.toExternalValue(layoutData.getHeight());
        e.setAttribute(ReportDesignerBoot.DESIGNER_NAMESPACE, "visual-height", new Double(height)); // NON-NLS
      }

      if (e instanceof Section)
      {
        iterateSection((Section) e);
View Full Code Here

    return new EditGroupsUndoEntry(entries, changedEntries);
  }

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

    final AbstractReportDefinition reportDefinition = renderContext.getReportDefinition();
    final StyleKey[] keys = StyleKey.getDefinedStyleKeys();
    for (int i = 0; i < visualElements.length; i++)
    {
      final InstanceID visualElement = visualElements[i];
      final ReportElement element = ModelUtility.findElementById(reportDefinition, visualElement);
      final ElementStyleSheet styleSheet = element.getStyle();
      final Object[] properties = oldStyle[i];
      for (int j = 0; j < keys.length; j++)
      {
        final StyleKey key = keys[j];
        styleSheet.setStyleProperty(key, properties[key.identifier]);
View Full Code Here

    final AbstractReportDefinition reportDefinition = renderContext.getReportDefinition();
    final StyleKey[] keys = StyleKey.getDefinedStyleKeys();
    for (int i = 0; i < visualElements.length; i++)
    {
      final InstanceID visualElement = visualElements[i];
      final ReportElement element = ModelUtility.findElementById(reportDefinition, visualElement);
      final ElementStyleSheet styleSheet = element.getStyle();
      final Object[] properties = currentStyle[i];
      for (int j = 0; j < keys.length; j++)
      {
        final StyleKey key = keys[j];
        styleSheet.setStyleProperty(key, properties[key.identifier]);
View Full Code Here

    final StyleKey[] keys = StyleKey.getDefinedStyleKeys();
    final InstanceID[] visualElements = getVisualElements();
    for (int i = 0; i < visualElements.length; i++)
    {
      final InstanceID visualElement = visualElements[i];
      final ReportElement element = ModelUtility.findElementById(reportDefinition, visualElement);
      final Expression[] properties = oldExpressions[i];
      for (int j = 0; j < keys.length; j++)
      {
        final StyleKey key = keys[j];
        element.setStyleExpression(key, properties[key.identifier]);
      }
    }
  }
View Full Code Here

TOP

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

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.