Class RunningElementContainer

java.lang.Object
com.itextpdf.html2pdf.attach.impl.layout.RunningElementContainer

public class RunningElementContainer extends Object
A wrapper for the running elements taken out of the normal flow.
  • Constructor Details

    • RunningElementContainer

      public RunningElementContainer (com.itextpdf.styledxmlparser.node.IElementNode runningElement, ITagWorker processedElementWorker)
      Initializes a new instance of RunningElementContainer that contains given running element IElementNode and ITagWorker instances.
      Parameters:
      runningElement - the IElementNode of the running element.
      processedElementWorker - the ITagWorker that was created for the running element and have been already completely processed (with all running element children).
  • Method Details

    • setOccurrencePage

      public void setOccurrencePage (int pageNum, boolean firstOnPage)
      Sets the page on which underlying running element was to be placed.
      Parameters:
      pageNum - the 1-based index of the page on which running element was to be placed.
      firstOnPage - specifies if the given running element would have placed as the first element on the page or not.
    • getOccurrencePage

      public int getOccurrencePage()
      Gets the page on which underlying running element was to be placed.
      Returns:
      the 1-based index of the page or 0 if element page is not yet defined.
    • isFirstOnPage

      public boolean isFirstOnPage()
      Specifies if the given running element would have placed as the first element on the page or not. Returned value only makes sense if getOccurrencePage() returns value greater than 0.
      Returns:
      true if it would be the first element on the page, otherwise false.