Package com.lowagie.text.pdf
Class PdfCell
java.lang.Object
com.lowagie.text.Rectangle
com.lowagie.text.pdf.PdfCell
- All Implemented Interfaces:
Element
A
PdfCell is the PDF translation of a Cell.
A PdfCell is an ArrayList of PdfLines.
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.
-
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, useVariableBordersFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the cellpadding of a cell..floatGets the cellspacing of a cell.floatReturns the lower left y-coordinate.intGets the number of the group this cell is in..getImages(float top, float bottom) Gets the images of a cell that can be drawn between certain limits.floatgetLeft()Returns the lower left x-coordinate.getLines(float top, float bottom) Gets the lines of a cell that can be drawn between certain limits.floatgetRight()Returns the upper right x-coordinate.floatgetTop()Returns the upper right y-coordinate.booleanGets the value of useAscenderbooleanGets the value of useBorderPadding.booleangets the value of useDescenderfloatleading()Gets the leading of a cell.protected voidprocessActions(Element element, PdfAction action, ArrayList allActions) Processes all actions contained in the cell.rectangle(float top, float bottom) Gets a Rectangle that is altered to fit on the page.floatReturns the height needed to draw the remaining text.intGets the number of the row this cell is in..introwspan()Gets the rowspan of a cell.voidsetBottom(float value) Sets the bottom of the Rectangle and determines the proper {link #verticalOffset} to appropriately align the contents vertically.voidsetUseAscender(boolean use) Sets the value of useAscender.voidsetUseBorderPadding(boolean use) Sets the value of useBorderPadding.voidsetUseDescender(boolean use) Sets the value of useDescender.intsize()Returns the number of lines in the cell.Methods inherited from class com.lowagie.text.Rectangle
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, setTop, setUseVariableBorders, softCloneNonPositionParameters, toString, type
-
Constructor Details
-
PdfCell
public PdfCell(Cell cell, int rownumber, float left, float right, float top, float cellspacing, float cellpadding) Constructs aPdfCell-object.- Parameters:
cell- the originalCellrownumber- the number of theRowtheCellwas in.left- the left border of thePdfCellright- the right border of thePdfCelltop- the top border of thePdfCellcellspacing- the cellspacing of theTablecellpadding- the cellpadding of theTable
-
-
Method Details
-
setBottom
public void setBottom(float value) Sets the bottom of the Rectangle and determines the proper {link #verticalOffset} to appropriately align the contents vertically. -
getLeft
public float getLeft()Returns the lower left x-coordinate. -
getRight
public float getRight()Returns the upper right x-coordinate. -
getTop
public float getTop()Returns the upper right y-coordinate. -
getBottom
public float getBottom()Returns the lower left y-coordinate. -
getLines
Gets the lines of a cell that can be drawn between certain limits.Remark: all the lines that can be drawn are removed from the object!
- Parameters:
top- the top of the part of the table that can be drawnbottom- the bottom of the part of the table that can be drawn- Returns:
- an
ArrayListofPdfLines
-
getImages
Gets the images of a cell that can be drawn between certain limits.Remark: all the lines that can be drawn are removed from the object!
- Parameters:
top- the top of the part of the table that can be drawnbottom- the bottom of the part of the table that can be drawn- Returns:
- an
ArrayListofImages
-
size
public int size()Returns the number of lines in the cell.- Returns:
- a value
-
remainingHeight
public float remainingHeight()Returns the height needed to draw the remaining text.- Returns:
- a height
-
leading
public float leading()Gets the leading of a cell.- Returns:
- the leading of the lines is the cell.
-
rownumber
public int rownumber()Gets the number of the row this cell is in..- Returns:
- a number
-
rowspan
public int rowspan()Gets the rowspan of a cell.- Returns:
- the rowspan of the cell
-
cellspacing
public float cellspacing()Gets the cellspacing of a cell.- Returns:
- a value
-
cellpadding
public float cellpadding()Gets the cellpadding of a cell..- Returns:
- a value
-
processActions
Processes all actions contained in the cell.- Parameters:
element- an element in the cellaction- an action that should be coupled to the cellallActions-
-
getGroupNumber
public int getGroupNumber()Gets the number of the group this cell is in..- Returns:
- a number
-
rectangle
Gets a Rectangle that is altered to fit on the page. -
setUseAscender
public void setUseAscender(boolean use) Sets the value of useAscender.- Parameters:
use- use ascender height if true
-
isUseAscender
public boolean isUseAscender()Gets the value of useAscender- Returns:
- useAscender
-
setUseDescender
public void setUseDescender(boolean use) Sets the value of useDescender.- Parameters:
use- use descender height if true
-
isUseDescender
public boolean isUseDescender()gets the value of useDescender- Returns:
- useDescender
-
setUseBorderPadding
public void setUseBorderPadding(boolean use) Sets the value of useBorderPadding.- Parameters:
use- adjust layout for borders if true
-
isUseBorderPadding
public boolean isUseBorderPadding()Gets the value of useBorderPadding.- Returns:
- useBorderPadding
-