|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.lowagie.text.Rectangle com.lowagie.text.SimpleTable
public class SimpleTable
Rectangle that can be used for Cells. This Rectangle is padded and knows how to draw itself in a PdfPTable or PdfPcellEvent.
Field Summary |
---|
Fields inherited from class com.lowagie.text.Rectangle |
---|
backgroundColor, border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBorders |
Fields inherited from interface com.lowagie.text.Element |
---|
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, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK |
Constructor Summary | |
---|---|
SimpleTable()
A RectangleCell is always constructed without any dimensions. |
Method Summary | |
---|---|
boolean |
add(java.lang.Object o)
Adds an object to the TextElementArray . |
void |
addElement(SimpleCell element)
Adds content to this object. |
PdfPTable |
createPdfPTable()
Creates a PdfPTable object based on this TableAttributes object. |
Table |
createTable()
Creates a Table object based on this TableAttributes object. |
int |
getAlignment()
|
float |
getCellpadding()
|
float |
getCellspacing()
|
float |
getWidth()
Returns the width of the rectangle. |
float |
getWidthpercentage()
|
boolean |
isNestable()
Checks if this element is nestable. |
void |
setAlignment(int alignment)
|
void |
setCellpadding(float cellpadding)
|
void |
setCellspacing(float cellspacing)
|
void |
setWidth(float width)
|
void |
setWidthpercentage(float widthpercentage)
|
void |
tableLayout(PdfPTable table,
float[][] widths,
float[] heights,
int headerRows,
int rowStart,
PdfContentByte[] canvases)
This method is called at the end of the table rendering. |
int |
type()
Gets the type of the text element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.lowagie.text.Element |
---|
getChunks, isContent, process, toString |
Constructor Detail |
---|
public SimpleTable()
Method Detail |
---|
public void addElement(SimpleCell element) throws BadElementException
element
-
BadElementException
public Table createTable() throws BadElementException
BadElementException
public PdfPTable createPdfPTable() throws DocumentException
DocumentException
public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
PdfPTableEvent
PdfContentByte
contained in
canvases
.canvases
are:
PdfPTable.BASECANVAS
- the original PdfContentByte
. Anything placed here
will be under the table.
PdfPTable.BACKGROUNDCANVAS
- the layer where the background goes to.
PdfPTable.LINECANVAS
- the layer where the lines go to.
PdfPTable.TEXTCANVAS
- the layer where the text go to. Anything placed here
will be over the table.
The widths
and heights
have the coordinates of the cells.
The size of the widths
array is the number of rows.
Each sub-array in widths
corresponds to the x column border positions where
the first element is the x coordinate of the left table border and the last
element is the x coordinate of the right table border.
If colspan is not used all the sub-arrays in widths
are the same.
For the heights
the first element is the y coordinate of the top table border and the last
element is the y coordinate of the bottom table border.
tableLayout
in interface PdfPTableEvent
table
- the PdfPTable
in usewidths
- an array of arrays with the cells' x positions. It has the length of the number
of rowsheights
- an array with the cells' y positions. It has a length of the number
of rows + 1headerRows
- the number of rows defined for the header.rowStart
- the first row number after the headercanvases
- an array of PdfContentByte
PdfPTableEvent.tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
public float getCellpadding()
public void setCellpadding(float cellpadding)
cellpadding
- The cellpadding to set.public float getCellspacing()
public void setCellspacing(float cellspacing)
cellspacing
- The cellspacing to set.public int getAlignment()
public void setAlignment(int alignment)
alignment
- The alignment to set.public float getWidth()
Rectangle
getWidth
in class Rectangle
public void setWidth(float width)
width
- The width to set.public float getWidthpercentage()
public void setWidthpercentage(float widthpercentage)
widthpercentage
- The widthpercentage to set.public int type()
Rectangle
type
in interface Element
type
in class Rectangle
Element.type()
public boolean isNestable()
Element
isNestable
in interface Element
isNestable
in class Rectangle
Element.isNestable()
public boolean add(java.lang.Object o)
TextElementArray
TextElementArray
.
add
in interface TextElementArray
o
- an object that has to be added
true
if the addition succeeded; false
otherwiseTextElementArray.add(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |