Class TableSupport

java.lang.Object
com.scroogexhtml.xmldom.table.TableSupportBase
com.scroogexhtml.xmldom.table.TableSupport
All Implemented Interfaces:
TableWriter

public class TableSupport extends TableSupportBase
TableSupport is used to build the DOM which represents an RTF table.
  • Field Details

  • Constructor Details

    • TableSupport

      public TableSupport(Document document, TablePropConfiguration tablePropConfiguration)
      Constructs an instance of TableSupport with the specified document and table property configuration.
      Parameters:
      document - the document to be used for table support operations.
      tablePropConfiguration - the configuration for table properties, determining how the table will be rendered and converted.
    • TableSupport

      public TableSupport(Document document, TablePropConfiguration tablePropConfiguration, StructureChecker checker)
      Constructs an instance of TableSupport.
      Parameters:
      document - the document to be used for table support operations.
      tablePropConfiguration - the configuration for table properties.
      checker - the structure checker of the conversion, or null for lenient handling.
    • TableSupport

      public TableSupport(Document document, TablePropConfiguration tablePropConfiguration, StructureChecker checker, OutputBudget budget)
      Constructs an instance of TableSupport.
      Parameters:
      document - the document to be used for table support operations.
      tablePropConfiguration - the configuration for table properties.
      checker - the structure checker of the conversion, or null for lenient handling.
      budget - the output budget of the conversion, or null for no limits.
  • Method Details

    • isInTableRowDefinition

      public boolean isInTableRowDefinition()
    • tableRowDefaults

      public void tableRowDefaults()
      Called when \trowd was detected. "A table row is a contiguous series of paragraphs partitioned into cells. The table row begins with the \trowd control word and ends with the \row control word."

      Note that for nested cells, Word 2002, Word 2003, and Word 2007 write the properties at the end only.

    • setInNestedTableProperties

      public void setInNestedTableProperties(boolean newValue)
    • createAndConfigureTable

      public void createAndConfigureTable(Element parentForNestedTable)
      Creates and configures a new table within the current document context. If a parent element for a nested table is provided, the table will be nested accordingly, adjusting its parent cell and ensuring the hierarchical structure is maintained. This method initializes the table with default settings, allowing for further customization.
      Parameters:
      parentForNestedTable - the parent element to nest this table under, allowing for hierarchical table structures, or null if the table is not nested.
    • startTableIfNone

      public void startTableIfNone()
      Opens a table for a cell that ends while no table is open: its row definition comes only after the cells (seen in Inhalt.rtf), or it has none at all.
    • tableRowEnds

      public void tableRowEnds()
    • closeTable

      public Table closeTable()
    • closeNestedTable

      public void closeNestedTable()
    • tableCellEnds

      public void tableCellEnds()
    • nestedTableCellEnds

      public void nestedTableCellEnds()
    • nestedTableRowEnds

      public void nestedTableRowEnds()