net.sf.jasperreports.engine

## Interface JRElementGroup

- All Superinterfaces:
    java.lang.Cloneable, JRChild, JRCloneable, JRVisitable
  All Known Subinterfaces:
    Cell, JRBand, JRCellContents, JRFrame, ListContents
  All Known Implementing Classes:
    BaseListContents, CompiledCell, DesignCell, DesignListContents, FillListContents, JRBaseBand, JRBaseCellContents, JRBaseElementGroup, JRBaseFrame, JRDesignBand, JRDesignCellContents, JRDesignElementGroup, JRDesignFrame, JRFillBand, JRFillCellContents, JRFillElementContainer, JRFillElementGroup, JRFillFrame, JRFillFrame.JRFillFrameElements

      public interface JRElementGroup
      extends JRChild

  Groups several report elements. Report elements placed in any report section can be arranged in multiple nested groups. The only reason you might have for grouping your elements is to be able to customize the stretch behavior of the report elements.

  One possible value of the `stretchType` attribute, available for all report elements, is `RelativeToTallestObject`. If you choose this option, the engine tries to identify the object from the same group as the current graphic element that has suffered the biggest amount of stretch. It will then adapt the height of the current report element to the height of this tallest element of the group.

  However, for this to work, you must group your elements. To do this, use the `<elementGroup>` and `</elementGroup>` tags to mark the elements that are part of the same group.

  Report sections are element groups themselves, so all report elements placed directly in a containing band are part of the same default element group, which is the band itself. As such, for these report elements, `stretchType="RelativeToTallestObject"` and `stretchType= "RelativeToBandHeight"` have the same effect.
  Version:
    $Id: JRElementGroup.java 7050 2014-04-25 11:09:07Z shertage $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<JRChild>` | `getChildren()` Gets a list of all direct children elements or elements groups.
    `JRElement` | `getElementByKey(java.lang.String key)` Gets an element from this group, based on its element key.
    `JRElementGroup` | `getElementGroup()` Gets the parent element group.
    `JRElement[]` | `getElements()` Gets an array containing all the elements and element groups in the hierarchy.

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRChild

      `clone`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRVisitable

      `visit`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRCloneable

      `clone`

- - ### Method Detail

    - #### getChildren

          java.util.List<JRChild> getChildren()

      Gets a list of all direct children elements or elements groups.

    - #### getElementGroup

          JRElementGroup getElementGroup()

      Gets the parent element group.
      Returns:
        an instance of this class, or null if this is the root group.

    - #### getElements

          JRElement[] getElements()

      Gets an array containing all the elements and element groups in the hierarchy.

    - #### getElementByKey

          JRElement getElementByKey(java.lang.String key)

      Gets an element from this group, based on its element key.

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com