Class PageFooter
- 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.PageFooter
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Element>
,DataTarget
,ReportElement
,RootLevelBand
public class PageFooter extends Band implements RootLevelBand
A report band that appears at the bottom of every page. The page-footer is the last band that is printed on a page. There is an option to suppress the page footer on the first page, and another option does the same for the last page. If the footer is marked sticky, the footer will even be printed for all sub-report pages. A page header or footer cannot have subreports.- Author:
- David Gilbert
- 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 Constructor Description PageFooter()
Constructs a page footer containing no elements.PageFooter(boolean onFirstPage, boolean onLastPage)
Constructs a page footer containing no elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementStyleSheet
getDefaultStyleSheet()
Returns the global stylesheet for all bands.SubReport
getSubReport(int index)
Throws an IndexOutOfBoundsException as page-footer cannot have sub-reports.int
getSubReportCount()
Returns the number of subreports on this band.SubReport[]
getSubReports()
Returns an empty array, as page-footer cannot have subreports.boolean
isDisplayOnFirstPage()
Returns true if the footer should be shown on page 1, and false otherwise.boolean
isDisplayOnLastPage()
Returns true if the footer should be shown on the last page, and false otherwise.boolean
isSticky()
Returns true if the footer should be shown on all subreports.void
setDisplayOnFirstPage(boolean b)
Defines whether the footer should be shown on the first page.void
setDisplayOnLastPage(boolean b)
Defines whether the footer should be shown on the last page.void
setSticky(boolean b)
Defines whether the footer should be shown on all subreports.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.Band
addElement, addElement, addElements, clear, clone, derive, 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
-
PageFooter
public PageFooter()
Constructs a page footer containing no elements.
-
PageFooter
public PageFooter(boolean onFirstPage, boolean onLastPage)
Constructs a page footer containing no elements.- Parameters:
onFirstPage
- defines, whether the page header will be printed on the first pageonLastPage
- defines, whether the page footer will be printed on the last page.
-
-
Method Detail
-
isDisplayOnFirstPage
public boolean isDisplayOnFirstPage()
Returns true if the footer should be shown on page 1, and false otherwise.- Returns:
- true or false.
-
setDisplayOnFirstPage
public void setDisplayOnFirstPage(boolean b)
Defines whether the footer should be shown on the first page.- Parameters:
b
- a flag indicating whether or not the footer is shown on the first page.
-
isDisplayOnLastPage
public boolean isDisplayOnLastPage()
Returns true if the footer should be shown on the last page, and false otherwise.- Returns:
- true or false.
-
setDisplayOnLastPage
public void setDisplayOnLastPage(boolean b)
Defines whether the footer should be shown on the last page.- Parameters:
b
- a flag indicating whether or not the footer is shown on the first page.
-
getSubReportCount
public final int getSubReportCount()
Returns the number of subreports on this band. This returns zero, as page-bands cannot have subreports.- Specified by:
getSubReportCount
in interfaceRootLevelBand
- Returns:
- the subreport count.
-
getSubReport
public final SubReport getSubReport(int index)
Throws an IndexOutOfBoundsException as page-footer cannot have sub-reports.- Specified by:
getSubReport
in interfaceRootLevelBand
- Parameters:
index
- the index.- Returns:
- nothing, as an exception is thrown instead.
-
isSticky
public boolean isSticky()
Returns true if the footer should be shown on all subreports.- Returns:
- true or false.
-
setSticky
public void setSticky(boolean b)
Defines whether the footer should be shown on all subreports.- Parameters:
b
- a flag indicating whether or not the footer is shown on the first page.
-
getSubReports
public SubReport[] getSubReports()
Returns an empty array, as page-footer cannot have subreports.- 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.
-
-