Class TableCssBuilder

java.lang.Object
com.scroogexhtml.xmldom.table.TableCssBuilder

public final class TableCssBuilder extends Object
CSS builder for table cell style.
  • Method Details

    • setCellStyle

      public static void setCellStyle(Element td, CellDef cd)
      Sets the style properties of a table cell based on the provided cell definition. The style includes the background color and vertical alignment as specified in the CellDef object.
      Parameters:
      td - the Element representing the table cell to which styles are applied
      cd - the CellDef object containing the style properties for the table cell
      See Also:
    • setCellStyle

      public static void setCellStyle(Element td, CellDef cd, boolean convertCellStyles)
      Sets the style properties of a table cell based on the provided cell definition.

      With convertCellStyles, a top-aligned cell (\clvertalt, or no \clvertal*, the RTF default) also gets vertical-align:top, because the HTML default is middle.

      Parameters:
      td - the Element representing the table cell to which styles are applied
      cd - the CellDef object containing the style properties for the table cell
      convertCellStyles - true if cell styles are converted