Cell

Overview

Cell is a class in Aspose.Pdf FOSS for Java.

Represents a single cell within a {@link Row} of a {@link Table}.

Properties

NameTypeAccessDescription
paragraphsParagraphsReadReturns the paragraphs collection for this cell, creating it lazily if needed.
colSpanintReadReturns the number of columns this cell spans.
rowSpanintReadReturns the number of rows this cell spans.
borderBorderInfoReadReturns the border styling for this cell.
backgroundColorColorReadReturns the background color of this cell.
marginMarginInfoReadReturns the cell padding (margin) information.
widthdoubleReadReturns the explicit width of this cell in points.
alignmentHorizontalAlignmentReadReturns the horizontal alignment for content within this cell.
defaultCellTextStateVerticalAlignmentVerticalAlignmentReadReturns the vertical alignment for content within this cell.
noBorderbooleanReadReturns whether this cell should have no border drawn.
wordWrappedbooleanReadReturns whether text content in this cell should be word-wrapped.

Methods

SignatureDescription
Cell()Creates a new empty Cell with default settings.
getParagraphs()ParagraphsReturns the paragraphs collection for this cell, creating it lazily if needed.
setParagraphs(paragraphs: Paragraphs)Sets the paragraphs collection for this cell.
getColSpan()intReturns the number of columns this cell spans.
setColSpan(colSpan: int)Sets the number of columns this cell spans.
getRowSpan()intReturns the number of rows this cell spans.
setRowSpan(rowSpan: int)Sets the number of rows this cell spans.
getBorder()BorderInfoReturns the border styling for this cell.
setBorder(border: BorderInfo)Sets the border styling for this cell.
getBackgroundColor()ColorReturns the background color of this cell.
setBackgroundColor(backgroundColor: Color)Sets the background color of this cell.
getMargin()MarginInfoReturns the cell padding (margin) information.
setMargin(margin: MarginInfo)Sets the cell padding (margin) information.
getWidth()doubleReturns the explicit width of this cell in points.
setWidth(width: double)Sets the explicit width of this cell in points.
getAlignment()HorizontalAlignmentReturns the horizontal alignment for content within this cell.
setAlignment(alignment: HorizontalAlignment)Sets the horizontal alignment for content within this cell.
getDefaultCellTextStateVerticalAlignment()VerticalAlignmentReturns the vertical alignment for content within this cell.
setDefaultCellTextStateVerticalAlignment(verticalAlignment: VerticalAlignment)Sets the vertical alignment for content within this cell.
isNoBorder()booleanReturns whether this cell should have no border drawn.
setNoBorder(noBorder: boolean)Sets whether this cell should have no border drawn.
isWordWrapped()booleanReturns whether text content in this cell should be word-wrapped.
setWordWrapped(wordWrapped: boolean)Sets whether text content in this cell should be word-wrapped.
clone()CellCreates a deep copy of this cell, including its paragraphs, border, margin,
background color, alignment, and span settings.

See Also