Class PageFunction

    • Constructor Detail

      • PageFunction

        public PageFunction()
        Constructs an unnamed function.

        This constructor is intended for use by the SAX handler class only.

      • PageFunction

        public PageFunction​(String name)
        Constructs a named function.
        Parameters:
        name - the function name.
    • Method Detail

      • isDeepTraversing

        public boolean isDeepTraversing()
        Checks whether this expression is a deep-traversing expression. Deep-traversing expressions receive events from all sub-reports. This returns true, as this function has to receive page-events even if a sub-report is currently being processed.
        Specified by:
        isDeepTraversing in interface Expression
        Overrides:
        isDeepTraversing in class AbstractExpression
        Returns:
        true.
      • setDependencyLevel

        public void setDependencyLevel​(int dependencyLevel)
        Defines the defined dependency level. For page functions, this level can be as low as the pagination level.
        Specified by:
        setDependencyLevel in interface Expression
        Overrides:
        setDependencyLevel in class AbstractExpression
        Parameters:
        dependencyLevel - the dependency level.
      • getPageIncrement

        public int getPageIncrement()
        Returns the page increment.
        Returns:
        the page increment.
      • setPageIncrement

        public void setPageIncrement​(int pageIncrement)
        Defines the page increment.
        Parameters:
        pageIncrement - the page increment.
      • getGroup

        public String getGroup()
        Returns the group name.
        Returns:
        the group name.
      • setGroup

        public void setGroup​(String group)
        Sets the name of the group that the function acts upon.
        Parameters:
        group - the group name.
      • getStartPage

        public int getStartPage()
        Returns the page number where the counting starts.
        Returns:
        the page number of the first page.
      • setStartPage

        public void setStartPage​(int startPage)
        Defines the page number where the counting starts.
        Parameters:
        startPage - the page number of the first page.
      • getPage

        public int getPage()
        Returns the current page.
        Returns:
        the current page.
      • setPage

        protected void setPage​(int page)
        Sets the current page.
        Parameters:
        page - the page.
      • pageStarted

        public void pageStarted​(ReportEvent event)
        Receives notification from the report engine that a new page is starting. Grabs the page number from the report state and stores it.
        Specified by:
        pageStarted in interface PageEventListener
        Parameters:
        event - the event.
      • isIgnoreNextPageStart

        protected boolean isIgnoreNextPageStart()
        Returns, whether the next page-start event will be ignored. This is an internal state flag to keep the computation in sync with the events.
        Returns:
        the flag.
      • pageFinished

        public void pageFinished​(ReportEvent event)
        Receives notification that a page is completed.
        Specified by:
        pageFinished in interface PageEventListener
        Parameters:
        event - The event.
      • getValue

        public Object getValue()
        Returns the page number (function value).
        Specified by:
        getValue in interface Expression
        Returns:
        the page number.
      • isIgnoreNextGroupStart

        protected boolean isIgnoreNextGroupStart()
        A internal flag that defines wether the next group start should be ignored. We have to ignore the first group start of each report so that the report-header becomes part of the first group's page sequence.
        Returns:
        the internal flag.
      • isIgnorePageCancelEvents

        protected boolean isIgnorePageCancelEvents()
        Deprecated.
        No longer used.
        A obsolete getter. Ignore it please, it has no effect.
        Returns:
        true, if you care to know.
      • setIgnorePageCancelEvents

        public void setIgnorePageCancelEvents​(boolean ignorePageCancelEvents)
        Deprecated.
        No longer used.
        A obsolete setter. Ignore it please, it has no effect.
        Parameters:
        ignorePageCancelEvents - ignored.