Package net.sf.jasperreports.engine
Interface JRElementGroup
- All Superinterfaces:
Cloneable,JRChild,JRCloneable,JRVisitable
- All Known Subinterfaces:
BaseCell,Cell,JRBand,JRCellContents,JRFrame,ListContents
- All Known Implementing Classes:
BaseListContents,CompiledBaseCell,CompiledCell,DesignBaseCell,DesignCell,DesignListContents,FillListContents,JRBaseBand,JRBaseCellContents,JRBaseElementGroup,JRBaseFrame,JRDesignBand,JRDesignCellContents,JRDesignElementGroup,JRDesignFrame,JRFillBand,JRFillCellContents,JRFillElementContainer,JRFillElementGroup,JRFillFrame,JRFillFrame.JRFillFrameElements
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.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Method Summary
Modifier and TypeMethodDescriptionGets a list of all direct children elements or elements groups.getElementByKey(String key) Gets an element from this group, based on its element key.Gets the parent element group.Gets an array containing all the elements and element groups in the hierarchy.Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
cloneMethods inherited from interface net.sf.jasperreports.engine.JRVisitable
visit
-
Method Details
-
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
Gets an element from this group, based on its element key.
-