public class TableWrapper extends Object implements Element
Modifier and Type | Field and Description |
---|---|
private float[] |
colWidths
Array containing the widths of the columns.
|
private List<List<PdfPCell>> |
rows
Nested list containing the PdfPCell elements that are part of this table.
|
private Map<String,String> |
styles
The styles that need to be applied to the table
|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK
Constructor and Description |
---|
TableWrapper(Map<String,String> attrs)
Creates a new instance of IncTable.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(List<PdfPCell> row)
Adds a new row to the table.
|
PdfPTable |
createTable()
Creates a new PdfPTable based on the info assembled
in the table stub.
|
List<Chunk> |
getChunks()
Gets all the chunks in this element.
|
boolean |
isContent()
Checks if this element is a content object.
|
boolean |
isNestable()
Checks if this element is nestable.
|
boolean |
process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener . |
void |
setColWidths(float[] colWidths)
Setter for the column widths
|
int |
type()
Gets the type of the text element.
|
private final Map<String,String> styles
private final List<List<PdfPCell>> rows
private float[] colWidths
public TableWrapper(Map<String,String> attrs)
attrs
- a Map containing attributespublic void addRow(List<PdfPCell> row)
row
- a list of PdfPCell elementspublic void setColWidths(float[] colWidths)
public PdfPTable createTable()
public List<Chunk> getChunks()
Element
public boolean isContent()
Element
public boolean isNestable()
Element
isNestable
in interface Element
public boolean process(ElementListener listener)
Element
ElementListener
.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses