Class AbstractRootLevelBand
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.Element
-
- org.pentaho.reporting.engine.classic.core.Section
-
- org.pentaho.reporting.engine.classic.core.Band
-
- org.pentaho.reporting.engine.classic.core.AbstractRootLevelBand
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Element>
,DataTarget
,ReportElement
,RootLevelBand
- Direct Known Subclasses:
CrosstabCell
,GroupFooter
,GroupHeader
,ItemBand
,NoDataBand
,ReportFooter
,ReportHeader
public abstract class AbstractRootLevelBand extends Band implements RootLevelBand
The root-level band is the container that is processed by a report-state. The root-level band processing is atomic - so either the full band is processed or not processed at all.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.pentaho.reporting.engine.classic.core.Band
ANONYMOUS_BAND_PREFIX
-
Fields inherited from class org.pentaho.reporting.engine.classic.core.Element
ANONYMOUS_ELEMENT_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractRootLevelBand()
Constructs a new band (initially empty).protected
AbstractRootLevelBand(boolean pagebreakBefore, boolean pagebreakAfter)
Constructs a new band with the given pagebreak attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSubReport(int index, SubReport element)
Attaches a new subreport at the end of the list.void
addSubReport(SubReport element)
Attaches a new subreport at the end of the list.AbstractRootLevelBand
clone()
Clones this band and all elements contained in this band.AbstractRootLevelBand
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids.ElementStyleSheet
getDefaultStyleSheet()
Returns the global stylesheet for all bands.SubReport
getSubReport(int index)
Returns the subreport at the given index-position.int
getSubReportCount()
Returns the number of subreports attached to this root level band.SubReport[]
getSubReports()
Returns all sub-reports as array.void
removeSubreport(SubReport e)
Removes the given subreport from the list of attached sub-reports.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Band
addElement, addElement, addElements, clear, getElement, getElement, getElementArray, getElementCount, getLayout, isPagebreakAfterPrint, isPagebreakBeforePrint, removeElement, removeElement, setElementAt, setLayout, setPagebreakAfterPrint, setPagebreakBeforePrint, toString, unsafeGetElementArray
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Section
iterator, registerAsChild, unregisterAsChild, unregisterParent, validateLooping
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Element
copyAttributes, copyInto, derive, getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeExpressions, getAttributeNames, getAttributeNamespaces, getAttributes, getAttributeTyped, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getContentBase, getDataSource, getDefinitionSource, getElementContext, getElementType, getElementTypeName, getFirstAttribute, getHRefTarget, getId, getMasterReport, getMetaData, getName, getObjectID, getParent, getParentSection, getReportDefinition, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, isDynamicContent, isVisible, notifyElement, notifyNodeChildAdded, notifyNodeChildRemoved, notifyNodePropertiesChanged, notifyNodePropertiesChanged, notifyNodeStructureChanged, setAttribute, setAttribute, setAttributeExpression, setChangeTracker, setComputedStyle, setDataSource, setDynamicContent, setElementType, setHRefTarget, setId, setName, setParent, setStyleExpression, setVisible, updateChangedFlagInternal, updateInternalChangeFlag
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.ReportElement
getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeNames, getAttributeNamespaces, getAttributes, getAttributeTyped, getChangeTracker, getChildElementByType, getChildElementsByName, getChildElementsByType, getComputedStyle, getElementContext, getElementType, getFirstAttribute, getId, getMetaData, getName, getObjectID, getParentSection, getReportDefinition, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, setAttribute, setAttribute, setAttributeExpression, setComputedStyle, setStyleExpression
-
-
-
-
Constructor Detail
-
AbstractRootLevelBand
protected AbstractRootLevelBand()
Constructs a new band (initially empty).
-
AbstractRootLevelBand
protected AbstractRootLevelBand(boolean pagebreakBefore, boolean pagebreakAfter)
Constructs a new band with the given pagebreak attributes. Pagebreak attributes have no effect on subbands.- Parameters:
pagebreakAfter
- defines, whether a pagebreak should be done after that band was printed.pagebreakBefore
- defines, whether a pagebreak should be done before that band gets printed.
-
-
Method Detail
-
getSubReportCount
public int getSubReportCount()
Returns the number of subreports attached to this root level band.- Specified by:
getSubReportCount
in interfaceRootLevelBand
- Returns:
- the number of subreports.
-
clone
public AbstractRootLevelBand clone()
Clones this band and all elements contained in this band. After the cloning the band is no longer connected to a report definition.- Specified by:
clone
in interfaceDataTarget
- Overrides:
clone
in classBand
- Returns:
- the clone of this band.
-
derive
public AbstractRootLevelBand derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids.- Overrides:
derive
in classBand
- Parameters:
preserveElementInstanceIds
- defines whether this call generates new instance-ids for the derived elements. Instance-IDs are used by the report processor to recognize reoccurring elements and must not changed within the report run. Outside of the report processors new instance ids should be generated at all times to separate instances and to make them uniquely identifiable.- Returns:
- the copy of the element.
-
getSubReport
public SubReport getSubReport(int index)
Returns the subreport at the given index-position.- Specified by:
getSubReport
in interfaceRootLevelBand
- Parameters:
index
- the index- Returns:
- the subreport stored at the given index.
- Throws:
IndexOutOfBoundsException
- if there is no such subreport.
-
addSubReport
public void addSubReport(int index, SubReport element)
Attaches a new subreport at the end of the list.- Parameters:
index
-element
- the subreport, never null.
-
addSubReport
public void addSubReport(SubReport element)
Attaches a new subreport at the end of the list.- Parameters:
element
- the subreport, never null.
-
removeSubreport
public void removeSubreport(SubReport e)
Removes the given subreport from the list of attached sub-reports.- Parameters:
e
- the subreport to be removed.
-
getSubReports
public SubReport[] getSubReports()
Returns all sub-reports as array.- Specified by:
getSubReports
in interfaceRootLevelBand
- Returns:
- the sub-reports as array.
-
getDefaultStyleSheet
public ElementStyleSheet getDefaultStyleSheet()
Description copied from class:Band
Returns the global stylesheet for all bands. This stylesheet provides the predefined default values for some of the stylekeys.- Specified by:
getDefaultStyleSheet
in interfaceReportElement
- Overrides:
getDefaultStyleSheet
in classBand
- Returns:
- the global default stylesheet.
-
-