Class RunningElementContainer
java.lang.Object
com.itextpdf.html2pdf.attach.impl.layout.RunningElementContainer
A wrapper for the running elements taken out of the normal flow.
-
Constructor Summary
ConstructorDescriptionRunningElementContainer
(com.itextpdf.styledxmlparser.node.IElementNode runningElement, ITagWorker processedElementWorker) Initializes a new instance ofRunningElementContainer
that contains given running elementIElementNode
andITagWorker
instances. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the page on which underlying running element was to be placed.boolean
Specifies if the given running element would have placed as the first element on the page or not.void
setOccurrencePage
(int pageNum, boolean firstOnPage) Sets the page on which underlying running element was to be placed.
-
Constructor Details
-
RunningElementContainer
public RunningElementContainer(com.itextpdf.styledxmlparser.node.IElementNode runningElement, ITagWorker processedElementWorker) Initializes a new instance ofRunningElementContainer
that contains given running elementIElementNode
andITagWorker
instances.- Parameters:
-
runningElement
- theIElementNode
of the running element. -
processedElementWorker
- theITagWorker
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 ifgetOccurrencePage()
returns value greater than 0.- Returns:
- true if it would be the first element on the page, otherwise false.
-