| Modifier and Type | Method and Description |
|---|---|
void |
copyCellStyle(Cell sourceCell)
Copies the style of an existing cell to this cell
|
HorizontalAlignment |
getAlign() |
LineStyle |
getBottomBorder() |
float |
getBottomPadding()
Gets cell's bottom padding (in points).
|
float |
getCellHeight()
Gets the height of the single cell, opposed to
getHeight(),
which returns the row's height. |
float |
getExtraWidth() |
Color |
getFillColor()
Gets fill (background)
Color for the current cell. |
org.apache.pdfbox.pdmodel.font.PDFont |
getFont()
Gets appropriate
PDFont for current cell. |
org.apache.pdfbox.pdmodel.font.PDFont |
getFontBold() |
float |
getFontSize()
Gets
PDFont size for current cell (in points). |
float |
getHeight()
Gets the cell's height according to
Row's height |
float |
getHorizontalFreeSpace()
Gets free horizontal space of cell.
|
float |
getInnerHeight()
Gets cell's height without (top,bottom) padding.
|
float |
getInnerWidth()
Gets cell's width without (left,right) padding.
|
LineStyle |
getLeftBorder() |
float |
getLeftPadding()
Gets cell's left padding (in points).
|
float |
getLineSpacing() |
Paragraph |
getParagraph()
Retrieves a valid
Paragraph depending of cell's PDFont
and value rotation. |
LineStyle |
getRightBorder() |
float |
getRightPadding()
Gets cell's right padding (in points).
|
String |
getText()
Retrieves text from current cell
|
Color |
getTextColor()
Retrieves cell's text
Color. |
float |
getTextHeight()
Gets
Paragraph's height |
float |
getTextWidth()
Gets
Paragraph's width |
LineStyle |
getTopBorder() |
float |
getTopPadding()
Gets cell's top padding (in points).
|
VerticalAlignment |
getValign() |
float |
getVerticalFreeSpace()
Gets free vertical space of cell.
|
float |
getWidth()
Gets cell's width.
|
WrappingFunction |
getWrappingFunction() |
Boolean |
hasSameStyle(Cell sourceCell)
Compares the style of a cell with another cell
|
boolean |
isColspanCell() |
boolean |
isHeaderCell() |
boolean |
isTextRotated() |
void |
setAlign(HorizontalAlignment align) |
void |
setBorderStyle(LineStyle border)
Easy setting for cell border style.
|
void |
setBottomBorderStyle(LineStyle bottomBorder) |
void |
setBottomPadding(float cellBottomPadding)
Sets cell's bottom padding (in points)
|
void |
setColspanCell(boolean isColspanCell) |
void |
setFillColor(Color fillColor)
Sets fill (background)
Color for the current cell. |
void |
setFont(org.apache.pdfbox.pdmodel.font.PDFont font)
Sets appropriate
PDFont for current cell. |
void |
setFontBold(org.apache.pdfbox.pdmodel.font.PDFont fontBold)
Sets the font used for bold text, for example in
header cells.
|
void |
setFontSize(float fontSize)
Sets
PDFont size for current cell (in points). |
void |
setHeaderCell(boolean isHeaderCell) |
void |
setHeight(Float height)
Sets the height of the single cell.
|
void |
setLeftBorderStyle(LineStyle leftBorder) |
void |
setLeftPadding(float cellLeftPadding)
Sets cell's left padding (in points)
|
void |
setLineSpacing(float lineSpacing) |
void |
setRightBorderStyle(LineStyle rightBorder) |
void |
setRightPadding(float cellRightPadding)
Sets cell's right padding (in points)
|
void |
setText(String text)
Sets cell's text value
|
void |
setTextColor(Color textColor)
Sets cell's text
Color. |
void |
setTextRotated(boolean textRotated) |
void |
setTopBorderStyle(LineStyle topBorder) |
void |
setTopPadding(float cellTopPadding)
Sets cell's top padding (in points)
|
void |
setValign(VerticalAlignment valign) |
void |
setWidth(float width) |
void |
setWrappingFunction(WrappingFunction wrappingFunction) |
public Color getTextColor()
Retrieves cell's text Color. Default color is black.
Color of the cell's textpublic void setTextColor(Color textColor)
Sets cell's text Color.
textColor - designated text Colorpublic Color getFillColor()
Gets fill (background) Color for the current cell.
Color for the cellpublic void setFillColor(Color fillColor)
Sets fill (background) Color for the current cell.
fillColor - Fill Color for the cellpublic float getWidth()
Gets cell's width.
public float getInnerWidth()
Gets cell's width without (left,right) padding.
public float getInnerHeight()
Gets cell's height without (top,bottom) padding.
public String getText()
Retrieves text from current cell
public void setText(String text)
Sets cell's text value
text - Text value of the cellpublic org.apache.pdfbox.pdmodel.font.PDFont getFont()
Gets appropriate PDFont for current cell.
PDFont for current cellIllegalArgumentException - if font is not set.public void setFont(org.apache.pdfbox.pdmodel.font.PDFont font)
Sets appropriate PDFont for current cell.
font - PDFont for current cellpublic float getFontSize()
Gets PDFont size for current cell (in points).
PDFont size for current cell (in points).public void setFontSize(float fontSize)
Sets PDFont size for current cell (in points).
fontSize - PDFont size for current cell (in points).public Paragraph getParagraph()
Retrieves a valid Paragraph depending of cell's PDFont
and value rotation.
If cell has rotated value then Paragraph width is depending of
getInnerHeight() otherwise getInnerWidth()
Paragraphpublic float getExtraWidth()
public float getHeight()
Gets the cell's height according to Row's height
Row's heightpublic float getCellHeight()
Gets the height of the single cell, opposed to getHeight(),
which returns the row's height.
Depending of rotated/normal cell's value there is two cases for calculation:
Paragraph's height
with necessery paddings (top,bottom)IllegalStateException - if font is not set.public void setHeight(Float height)
Sets the height of the single cell.
height - Cell's heightpublic float getLeftPadding()
Gets cell's left padding (in points).
public void setLeftPadding(float cellLeftPadding)
Sets cell's left padding (in points)
cellLeftPadding - Cell's left padding (in points).public float getRightPadding()
Gets cell's right padding (in points).
public void setRightPadding(float cellRightPadding)
Sets cell's right padding (in points)
cellRightPadding - Cell's right padding (in points).public float getTopPadding()
Gets cell's top padding (in points).
public void setTopPadding(float cellTopPadding)
Sets cell's top padding (in points)
cellTopPadding - Cell's top padding (in points).public float getBottomPadding()
Gets cell's bottom padding (in points).
public void setBottomPadding(float cellBottomPadding)
Sets cell's bottom padding (in points)
cellBottomPadding - Cell's bottom padding (in points).public float getVerticalFreeSpace()
Gets free vertical space of cell.
If cell has rotated value then free vertical space is equal inner cell's
height (getInnerHeight()) subtracted to the longest line of
rotated Paragraph otherwise it's just cell's inner height (
getInnerHeight()) subtracted with width of the normal
Paragraph.
public float getHorizontalFreeSpace()
Gets free horizontal space of cell.
If cell has rotated value then free horizontal space is equal cell's
inner width (getInnerWidth()) subtracted to the
Paragraph's height otherwise it's just cell's
getInnerWidth() subtracted with width of longest line in normal
Paragraph.
public HorizontalAlignment getAlign()
public VerticalAlignment getValign()
public boolean isHeaderCell()
public void setHeaderCell(boolean isHeaderCell)
public WrappingFunction getWrappingFunction()
public void setWrappingFunction(WrappingFunction wrappingFunction)
public LineStyle getLeftBorder()
public LineStyle getRightBorder()
public LineStyle getTopBorder()
public LineStyle getBottomBorder()
public void setLeftBorderStyle(LineStyle leftBorder)
public void setRightBorderStyle(LineStyle rightBorder)
public void setTopBorderStyle(LineStyle topBorder)
public void setBottomBorderStyle(LineStyle bottomBorder)
public void setBorderStyle(LineStyle border)
Easy setting for cell border style.
border - It is LineStyle for all bordersRendering line attributespublic boolean isTextRotated()
public void setTextRotated(boolean textRotated)
public org.apache.pdfbox.pdmodel.font.PDFont getFontBold()
public void setFontBold(org.apache.pdfbox.pdmodel.font.PDFont fontBold)
Sets the font used for bold text, for example in header cells.
fontBold - The font to use for bold textpublic boolean isColspanCell()
public void setColspanCell(boolean isColspanCell)
public void setAlign(HorizontalAlignment align)
public void setValign(VerticalAlignment valign)
public void copyCellStyle(Cell sourceCell)
Copies the style of an existing cell to this cell
sourceCell - Source Cell from which cell style will be copied.public Boolean hasSameStyle(Cell sourceCell)
Compares the style of a cell with another cell
sourceCell - Source Cell which will be used for style comparationpublic void setWidth(float width)
public float getLineSpacing()
public void setLineSpacing(float lineSpacing)
Copyright © 2020. All rights reserved.