Class RepeatablePageMasterReference

    • Field Detail

      • masterReference

        private java.lang.String masterReference
      • maximumRepeats

        private Property maximumRepeats
      • numberConsumed

        private int numberConsumed
    • Constructor Detail

      • RepeatablePageMasterReference

        public RepeatablePageMasterReference​(FONode parent)
        Base constructor
        Parameters:
        parent - FONode that is the parent of this object
    • Method Detail

      • bind

        public void bind​(PropertyList pList)
                  throws FOPException
        Bind property values from the property list to the FO node. Must be overridden in all FObj subclasses that have properties applying to it.
        Overrides:
        bind in class FObj
        Parameters:
        pList - the PropertyList where the properties can be found.
        Throws:
        FOPException - if there is a problem binding the values
      • startOfNode

        public void startOfNode()
                         throws FOPException
        Called after processNode() is called. Subclasses can do additional processing.
        Overrides:
        startOfNode in class FObj
        Throws:
        FOPException - FOP Exception
      • validateChildNode

        protected void validateChildNode​(org.xml.sax.Locator loc,
                                         java.lang.String nsURI,
                                         java.lang.String localName)
                                  throws ValidationException
        Checks to make sure, during SAX processing of input document, that the incoming node is valid for this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called from FOTreeBuilder.startElement(String, String, String, Attributes) before constructing the child FObj.
        XSL Content Model: empty
        Overrides:
        validateChildNode in class FONode
        Parameters:
        loc - location in the FO source file
        nsURI - namespace of incoming node
        localName - name of the incoming node (without namespace prefix)
        Throws:
        ValidationException - if incoming node not valid for parent
      • getNextPageMaster

        public SimplePageMaster getNextPageMaster​(boolean isOddPage,
                                                  boolean isFirstPage,
                                                  boolean isLastPage,
                                                  boolean isEmptyPage,
                                                  boolean skipPagePositionOnly)
        Returns the name of the next page master.
        Specified by:
        getNextPageMaster in interface SubSequenceSpecifier
        Parameters:
        isOddPage - True if the next page number is odd
        isFirstPage - True if the next page is the first
        isLastPage - True if the next page is the last
        isEmptyPage - True if the next page is blank
        Returns:
        the page master name
      • getMaximumRepeats

        public int getMaximumRepeats()
        Get the value of the maximum-repeats property.
        Returns:
        the "maximum-repeats" property
      • reset

        public void reset()
        Called before a new page sequence is rendered so subsequences can reset any state they keep during the formatting process.
        Specified by:
        reset in interface SubSequenceSpecifier
      • goToPrevious

        public boolean goToPrevious()
        Used to set the "cursor position" to the previous item.
        Specified by:
        goToPrevious in interface SubSequenceSpecifier
        Returns:
        true if there is a previous item, false if the current one was the first one.
      • hasPagePositionLast

        public boolean hasPagePositionLast()
        Specified by:
        hasPagePositionLast in interface SubSequenceSpecifier
        Returns:
        true if the subsequence has a page master for page-position "last"
      • hasPagePositionOnly

        public boolean hasPagePositionOnly()
        Specified by:
        hasPagePositionOnly in interface SubSequenceSpecifier
        Returns:
        true if the subsequence has a page master for page-position "only"
      • getLocalName

        public java.lang.String getLocalName()
        Returns the local name (i.e. without namespace prefix) of the node
        Specified by:
        getLocalName in class FONode
        Returns:
        the local name of this node
      • canProcess

        public boolean canProcess​(java.lang.String flowName)
        Specified by:
        canProcess in interface SubSequenceSpecifier
        Parameters:
        flowName - name of the main flow
        Returns:
        true iff page sequence is a finite sequence or can process the entire main flow
      • isInfinite

        public boolean isInfinite()
        Test that this is a finite sequence
        Specified by:
        isInfinite in interface SubSequenceSpecifier
        Returns:
        true iff this is a finite sequence
      • isReusable

        public boolean isReusable()
        Test if this can be reused when it is the last sub-sequence specifer, and has been exhausted
        Specified by:
        isReusable in interface SubSequenceSpecifier
        Returns:
        true if and only if it can be reused