Package org.docx4j.model.table
Class TableModelCell
java.lang.Object
org.docx4j.model.table.TableModelCell
- Direct Known Subclasses:
AbstractTableWriterModelCell
public class TableModelCell
extends java.lang.Object
A cell in the table holding its own content, too
-
Field Summary
Fields Modifier and Type Field Description protected booleandummyIf this is a real cell or only a placeholder.protected booleandummyAfterprotected booleandummyBeforeIn XSL FO, we need to write cells for before & after, but not dummy cells for horizontal mergeprotected introwspanprotected TcPrtcPr -
Constructor Summary
Constructors Constructor Description TableModelCell(TableModel table, int row, int col)Create a dummy cell without contentTableModelCell(TableModel table, int row, int col, Tc tc) -
Method Summary
Modifier and Type Method Description java.lang.StringdebugStr()intgetColspan()intgetColumn()intgetExtraCols()How many columns are merged into this cellintgetExtraRows()TcPrgetTcPr()protected voidincrementRowSpan()If this is a real cell, increment rowspan; if this is a dummy, propagate the call to the cell upwardsbooleanisDummy()booleanisDummyAfter()booleanisDummyBefore()booleanisVMerged()voidsetColspan(int colspan)
-
Field Details
-
rowspan
protected int rowspan -
dummy
protected boolean dummyIf this is a real cell or only a placeholder. Vertically merged cells are represented as a real cell on the top and dummy cell(s) below -
dummyBefore
protected boolean dummyBeforeIn XSL FO, we need to write cells for before & after, but not dummy cells for horizontal merge -
dummyAfter
protected boolean dummyAfter -
tcPr
-
-
Constructor Details
-
TableModelCell
Create a dummy cell without content -
TableModelCell
-
-
Method Details
-
getColspan
public int getColspan() -
setColspan
public void setColspan(int colspan) -
isDummyBefore
public boolean isDummyBefore() -
isDummyAfter
public boolean isDummyAfter() -
getTcPr
-
getExtraCols
public int getExtraCols()How many columns are merged into this cell- Returns:
- 0 if none merged; 1 if two cells are merged so there is one extra; etc. A dummy cell has the same extraCols value as its upper neighbor.
-
getExtraRows
public int getExtraRows() -
isDummy
public boolean isDummy() -
getColumn
public int getColumn() -
incrementRowSpan
protected void incrementRowSpan()If this is a real cell, increment rowspan; if this is a dummy, propagate the call to the cell upwards -
debugStr
public java.lang.String debugStr() -
isVMerged
public boolean isVMerged()
-