public class TableElement
extends Element
A class TableElement
is a special container class Element
for
class RowElement
. Unlike other class Element
, a class TableElement
can span multiple pages and therfore handles rendering differently than
other class Element
.
Element.Companion
Constructor and Description |
---|
TableElement(Document parent)
A
class TableElement is a special container class Element for
class RowElement . Unlike other class Element , a class TableElement
can span multiple pages and therfore handles rendering differently than
other class Element . |
Modifier and Type | Method and Description |
---|---|
RowElement |
getHeader()
A sticky header that will be repeated on top of each page.
|
Document |
getParent() |
java.util.List<com.github.timrs2998.pdfbuilder.RowElement> |
getRows() |
float |
instanceHeight(float width,
float startY)
Determines the innermost height of the element, excluding margins and padding.
|
void |
render(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
float startX,
float endX,
float startY,
float minHeight)
Renders the entire element including margins, padding, borders, and background. Unless
overridden, assumes the element being rendered will fit on the page. Multi-page elements
(ie:
class TableElement ) must handle paging themselves. |
void |
renderInstance(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
float startX,
float endX,
float startY,
float minHeight)
Renders the innermost element, excluding margins, padding, borders, and background.
|
void |
setHeader(RowElement p)
A sticky header that will be repeated on top of each page.
|
getBackgroundColor, getBorder, getDocument, getFontColor, getFontSize, getHorizontalAlignment, getMargin, getPadding, getParent, getPdFont, height, instanceHeight, render, renderInstance, setBackgroundColor, setBorder, setFontColor, setFontSize, setHorizontalAlignment, setMargin, setPadding, setPdFont
public TableElement(Document parent)
A class TableElement
is a special container class Element
for
class RowElement
. Unlike other class Element
, a class TableElement
can span multiple pages and therfore handles rendering differently than
other class Element
.
public RowElement getHeader()
A sticky header that will be repeated on top of each page.
public void setHeader(RowElement p)
A sticky header that will be repeated on top of each page.
public java.util.List<com.github.timrs2998.pdfbuilder.RowElement> getRows()
public float instanceHeight(float width, float startY)
Determines the innermost height of the element, excluding margins and padding.
public void render(org.apache.pdfbox.pdmodel.PDDocument pdDocument, float startX, float endX, float startY, float minHeight)
Renders the entire element including margins, padding, borders, and background. Unless
overridden, assumes the element being rendered will fit on the page. Multi-page elements
(ie: class TableElement
) must handle paging themselves.
class TableElement
public void renderInstance(org.apache.pdfbox.pdmodel.PDDocument pdDocument, float startX, float endX, float startY, float minHeight)
Renders the innermost element, excluding margins, padding, borders, and background.
public Document getParent()