Class TableModelCell

java.lang.Object
org.docx4j.model.table.TableModelCell
Direct Known Subclasses:
AbstractTableWriterModelCell

public class TableModelCell extends Object
A cell in the table holding its own content, too
  • Field Details

    • rowspan

      protected int rowspan
    • dummy

      protected boolean dummy
      If 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 dummyBefore
      In XSL FO, we need to write cells for before & after, but not dummy cells for horizontal merge
    • dummyAfter

      protected boolean dummyAfter
    • tcPr

      protected TcPr tcPr
  • Constructor Details

    • TableModelCell

      public TableModelCell(TableModel table, int row, int col)
      Create a dummy cell without content
    • TableModelCell

      public TableModelCell(TableModel table, int row, int col, Tc tc)
  • Method Details

    • getColspan

      public int getColspan()
    • setColspan

      public void setColspan(int colspan)
    • isDummyBefore

      public boolean isDummyBefore()
    • isDummyAfter

      public boolean isDummyAfter()
    • getTcPr

      public TcPr 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 String debugStr()
    • isVMerged

      public boolean isVMerged()