Cell

Overview

Cell is a class in Aspose.Words FOSS for Java. Inherits from: CompositeNode<Node>, ICellAttrSource, ITrackableNode.

Represents a table cell.

Edition status of its 27 listed members (a property and its accessor methods are listed separately, overloads once): 27 not yet exercised by a verified example.

This class declares 16 methods for Cell objects in Java programs. Available methods include: Cell, accept, acceptEnd, acceptStart, ensureMinimum, getCellFormat, getFirstParagraph, getLastParagraph, getNextCell, getNodeType, getParagraphs, getParentRow, and 4 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: cellFormat, firstCell, firstParagraph, lastCell, lastParagraph, nextCell, and 5 more.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns Cell.
nextCellCellReadGets the next Cell node.
previousCellCellReadGets the previous Cell node.
parentRowRowReadReturns the parent row of the cell.
firstParagraphParagraphReadGets the first paragraph among the immediate children.
lastParagraphParagraphReadGets the last paragraph among the immediate children.
firstCellbooleanReadTrue if this is the first cell inside a row; false otherwise.
lastCellbooleanReadTrue if this is the last cell inside a row; false otherwise.
cellFormatCellFormatReadProvides access to the formatting properties of the cell.
paragraphsParagraphCollectionReadGets a collection of paragraphs that are immediate children of the cell.
tablesTableCollectionReadGets a collection of tables that are immediate children of the cell.

Methods

SignatureDescription
Cell(doc: DocumentBase)Initializes a new instance of the Cell class.
getNodeType() → intReturns Cell.
getNextCell() → CellGets the next Cell node.
getPreviousCell() → CellGets the previous Cell node.
getParentRow() → RowReturns the parent row of the cell.
getFirstParagraph() → ParagraphGets the first paragraph among the immediate children.
getLastParagraph() → ParagraphGets the last paragraph among the immediate children.
isFirstCell() → booleanTrue if this is the first cell inside a row; false otherwise.
isLastCell() → booleanTrue if this is the last cell inside a row; false otherwise.
getCellFormat() → CellFormatProvides access to the formatting properties of the cell.
getParagraphs() → ParagraphCollectionGets a collection of paragraphs that are immediate children of the cell.
getTables() → TableCollectionGets a collection of tables that are immediate children of the cell.
accept(visitor: DocumentVisitor) → booleanCalls accept(visitor) on this Cell instance.
acceptStart(visitor: DocumentVisitor) → intAccepts a visitor for visiting the start of the cell.
acceptEnd(visitor: DocumentVisitor) → intAccepts a visitor for visiting the end of the cell.
ensureMinimum()If the last child is not a paragraph, creates and appends one empty paragraph.

See Also