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 boolean dummy
    If this is a real cell or only a placeholder.
    protected boolean dummyAfter  
    protected boolean dummyBefore
    In XSL FO, we need to write cells for before & after, but not dummy cells for horizontal merge
    protected int rowspan  
    protected TcPr tcPr  
  • Constructor Summary

    Constructors 
    Constructor Description
    TableModelCell​(TableModel table, int row, int col)
    Create a dummy cell without content
    TableModelCell​(TableModel table, int row, int col, Tc tc)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String debugStr()  
    int getColspan()  
    int getColumn()  
    int getExtraCols()
    How many columns are merged into this cell
    int getExtraRows()  
    TcPr getTcPr()  
    protected void incrementRowSpan()
    If this is a real cell, increment rowspan; if this is a dummy, propagate the call to the cell upwards
    boolean isDummy()  
    boolean isDummyAfter()  
    boolean isDummyBefore()  
    boolean isVMerged()  
    void setColspan​(int colspan)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

  • 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 java.lang.String debugStr()
    • isVMerged

      public boolean isVMerged()