Class 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
    • 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 page
        onLastPage - 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 interface RootLevelBand
        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 interface RootLevelBand
        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 interface RootLevelBand
        Returns:
        the sub-reports as array.