java.lang.Objectcom.lowagie.text.Rectangle
com.lowagie.text.Cell
All Implemented Interfaces:
TextElementArray, Element
Direct Known Subclasses:
RtfTableCell, RtfCell
Cell
is a Rectangle
containing other
Element
s.
A Cell
must be added to a Table
.
The Table
will place the Cell
in
a Row
.
Example:
Table table = new Table(3); table.setBorderWidth(1); table.setBorderColor(new Color(0, 0, 255)); table.setCellpadding(5); table.setCellspacing(5); Cell cell = new Cell("header"); cell.setHeader(true); cell.setColspan(3); table.addCell(cell); cell = new Cell("example cell with colspan 1 and rowspan 2"); cell.setRowspan(2); cell.setBorderColor(new Color(255, 0, 0)); table.addCell(cell); table.addCell("1.1"); table.addCell("2.1"); table.addCell("1.2"); table.addCell("2.2");
Field Summary | ||
---|---|---|
protected ArrayList | arrayList | The ArrayList of Element s
that are part of the content of the Cell. |
protected int | horizontalAlignment | The horizontal alignment of the cell content. |
protected int | verticalAlignment | The vertical alignment of the cell content. |
protected float | width | The width of the cell as a String. It can be an absolute value "100" or a percentage "20%". |
protected boolean | percentage | |
protected int | colspan | The colspan of the cell. |
protected int | rowspan | The rowspan of the cell. |
float | leading | The leading of the content inside the cell. |
protected boolean | header | Is this Cell a header? |
protected int | maxLines | Maximum number of lines allowed in the cell. The default value of this property is not to limit the maximum number of lines (contributed by dperezcar@fcc.es) |
String | showTruncation | If a truncation happens due to the maxLines property, then this text will be added to indicate a truncation has happened. Default value is null, and means avoiding marking the truncation. A useful value of this property could be e.g. "..." (contributed by dperezcar@fcc.es) |
protected boolean | useAscender | Indicates that the largest ascender height should be used to determine the height of the first line. Note that this only has an effect when rendered to PDF. Setting this to true can help with vertical alignment problems. |
protected boolean | useDescender | Indicates that the largest descender height should be added to the height of the last line (so characters like y don't dip into the border). Note that this only has an effect when rendered to PDF. |
protected boolean | useBorderPadding | Adjusts the cell contents to compensate for border widths. Note that this only has an effect when rendered to PDF. |
protected boolean | groupChange | Does this Cell force a group change? |
Fields inherited from com.lowagie.text.Rectangle: |
---|
UNDEFINED, TOP, BOTTOM, LEFT, RIGHT, NO_BORDER, BOX, llx, lly, urx, ury, rotation, backgroundColor, border, useVariableBorders, borderWidth, borderWidthLeft, borderWidthRight, borderWidthTop, borderWidthBottom, borderColor, borderColorLeft, borderColorRight, borderColorTop, borderColorBottom |
Constructor: |
---|
Cell . |
Cell (for internal use only).
|
Cell with a certain content.
The
|
Cell with a certain Element .
if the element is a
|
Method from com.lowagie.text.Cell Summary: |
---|
add, addElement, bottom, clear, createPdfPCell, fill, getBottom, getChunks, getColspan, getElements, getGroupChange, getHorizontalAlignment, getLeading, getLeft, getMaxLines, getRight, getRowspan, getShowTruncation, getTop, getVerticalAlignment, getWidth, getWidthAsString, isEmpty, isHeader, isTable, isUseAscender, isUseBorderPadding, isUseDescender, left, process, right, setBottom, setColspan, setGroupChange, setHeader, setHorizontalAlignment, setHorizontalAlignment, setLeading, setLeft, setMaxLines, setRight, setRowspan, setShowTruncation, setTop, setUseAscender, setUseBorderPadding, setUseDescender, setVerticalAlignment, setVerticalAlignment, setWidth, setWidth, size, top, type |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from com.lowagie.text.Cell Detail: |
---|
Object to this cell. |
Cell .
Remark: you can't add |
UnsupportedOperationException . |
Element s of this Cell . |
|
|
UnsupportedOperationException . |
|
|
Element s. |
Cell force a group change? |
|
|
UnsupportedOperationException . |
|
UnsupportedOperationException . |
|
|
UnsupportedOperationException . |
|
|
|
Cell is empty. |
Cell a header? |
Cell is a placeholder for a (nested) table. |
|
|
|
UnsupportedOperationException . |
ElementListener . |
UnsupportedOperationException . |
UnsupportedOperationException . |
|
|
|
|
|
|
UnsupportedOperationException . |
|
UnsupportedOperationException . |
|
|
UnsupportedOperationException . |
|
|
|
|
|
|
|
Element s in the Cell. |
UnsupportedOperationException . |
|