public class PdfCell extends Rectangle
PdfCell
is the PDF translation of a Cell
.
A PdfCell
is an ArrayList
of PdfLine
s.
When using variable borders (isUseVariableBorders()
== true),
the borders are drawn completely inside the cell Rectangle
so that adjacent cell borders will not overlap.
Otherwise, the borders are drawn on top of the edges of the
cell Rectangle and will overlap the borders of adjacent
cells.
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
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, FOOTNOTE, 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 and Description |
---|
PdfCell(Cell cell,
int rownumber,
float left,
float right,
float top,
float cellspacing,
float cellpadding)
Constructs a
PdfCell -object. |
Modifier and Type | Method and Description |
---|---|
float |
cellpadding()
Gets the cellpadding of a cell..
|
float |
cellspacing()
Gets the cellspacing of a cell.
|
float |
getBottom()
Returns the lower left y-coordinate.
|
int |
getGroupNumber()
Gets the number of the group this cell is in..
|
ArrayList<Image> |
getImages(float top,
float bottom)
Gets the images of a cell that can be drawn between certain limits.
|
float |
getLeft()
Returns the lower left x-coordinate.
|
ArrayList<PdfLine> |
getLines(float top,
float bottom)
Gets the lines of a cell that can be drawn between certain limits.
|
float |
getRight()
Returns the upper right x-coordinate.
|
float |
getTop()
Returns the upper right y-coordinate.
|
boolean |
isUseAscender()
Gets the value of useAscender
|
boolean |
isUseBorderPadding()
Gets the value of useBorderPadding.
|
boolean |
isUseDescender()
gets the value of useDescender
|
float |
leading()
Gets the leading of a cell.
|
protected void |
processActions(Element element,
PdfAction action,
List<PdfAction> allActions)
Processes all actions contained in the cell.
|
Rectangle |
rectangle(float top,
float bottom)
Gets a Rectangle that is altered to fit on the page.
|
float |
remainingHeight()
Returns the height needed to draw the remaining text.
|
int |
rownumber()
Gets the number of the row this cell is in..
|
int |
rowspan()
Gets the rowspan of a cell.
|
void |
setBottom(float value)
Sets the bottom of the Rectangle and determines the proper {link #verticalOffset}
to appropriately align the contents vertically.
|
void |
setUseAscender(boolean use)
Sets the value of useAscender.
|
void |
setUseBorderPadding(boolean use)
Sets the value of useBorderPadding.
|
void |
setUseDescender(boolean use)
Sets the value of useDescender.
|
int |
size()
Returns the number of lines in the cell.
|
cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBackgroundColor, getBorder, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getChunks, getGrayFill, getHeight, getLeft, getRight, getRotation, getTop, getWidth, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, normalize, process, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setGrayFill, setLeft, setRight, setRotation, setTop, setUseVariableBorders, softCloneNonPositionParameters, toString, type
public PdfCell(Cell cell, int rownumber, float left, float right, float top, float cellspacing, float cellpadding)
PdfCell
-object.cell
- the original Cell
rownumber
- the number of the Row
the Cell
was in.left
- the left border of the PdfCell
right
- the right border of the PdfCell
top
- the top border of the PdfCell
cellspacing
- the cellspacing of the Table
cellpadding
- the cellpadding of the Table
public void setBottom(float value)
public float getLeft()
public float getRight()
public float getTop()
public float getBottom()
public ArrayList<PdfLine> getLines(float top, float bottom)
Remark: all the lines that can be drawn are removed from the object!
top
- the top of the part of the table that can be drawnbottom
- the bottom of the part of the table that can be drawnArrayList
of PdfLine
spublic ArrayList<Image> getImages(float top, float bottom)
Remark: all the lines that can be drawn are removed from the object!
top
- the top of the part of the table that can be drawnbottom
- the bottom of the part of the table that can be drawnArrayList
of Image
spublic int size()
public float remainingHeight()
public float leading()
public int rownumber()
public int rowspan()
public float cellspacing()
public float cellpadding()
protected void processActions(Element element, PdfAction action, List<PdfAction> allActions)
element
- an element in the cellaction
- an action that should be coupled to the cellallActions
- public int getGroupNumber()
public Rectangle rectangle(float top, float bottom)
public void setUseAscender(boolean use)
use
- use ascender height if truepublic boolean isUseAscender()
public void setUseDescender(boolean use)
use
- use descender height if truepublic boolean isUseDescender()
public void setUseBorderPadding(boolean use)
use
- adjust layout for borders if truepublic boolean isUseBorderPadding()
Copyright © 2020. All rights reserved.