Class TableBuilder

java.lang.Object
com.aquima.interactions.composer.model.table.TableBuilder

public final class TableBuilder extends Object
This class may be used to create a container structure that represents a table.
Since:
8.4
Author:
Jon van Leuven
  • Constructor Details

    • TableBuilder

      public TableBuilder(String name, int columnCount)
      Construct a table builder.
      Parameters:
      name - The name that is used as container name of the root container, may not be null or empty
      columnCount - The number of columns that the resulting table will have, may not be 0 or negative
  • Method Details

    • addRow

      public void addRow()
      This method adds a row.
    • setRowId

      public void setRowId(String rowId)
      This method set the id of the current row.
      Parameters:
      rowId - The id of the row.
    • addRowPresentationStyle

      public void addRowPresentationStyle(PresentationStyle style)
      This method adds a presentation style to the current row. When null is passed, no style will be added.
      Parameters:
      style - The style of the row, may be null.
    • addRowProperty

      public void addRowProperty(String key, String value)
    • addRowCellPresentationStyle

      public void addRowCellPresentationStyle(PresentationStyle style)
      This method adds a presentation style to the current row cell. When null is passed, no style will be added.
      Parameters:
      style - The style of the row cell, may be null.
    • addHeaderCellPresentationStyle

      public void addHeaderCellPresentationStyle(PresentationStyle style)
      This method adds a presentation style to the current header cell. When null is passed, no style will be added.
      Parameters:
      style - The style of the header cell, may be null.
    • setRowCellColspan

      public void setRowCellColspan(int colspan)
      This method sets the colspan for the current row cell.
      Parameters:
      colspan - The colspan of the cell.
    • setRowCellAlignment

      public void setRowCellAlignment(AlignType align)
      This method set the alignment for the current row cell.
      Parameters:
      align - The alignment of the cell, may be null.
    • addRowCell

      public void addRowCell(Element cellContent)
      This method adds a cell to the current row.
      Parameters:
      cellContent - The content of the cell, may be null.
    • addRowCell

      public void addRowCell(Element[] cellContent)
      This method adds a cell to the current row.
      Parameters:
      cellContent - The content of the cell, may be null.
    • setHeaderCellAlignment

      public void setHeaderCellAlignment(AlignType align)
      This method sets the alignment for the current header cell.
      Parameters:
      align - The alignment of the cell, may be null.
    • addHeaderCell

      public void addHeaderCell(IElement cellContent)
      This method adds an header cell.
      Parameters:
      cellContent - The cell content cell, may be null.
    • addHeaderCell

      public void addHeaderCell(IElement[] cellContent)
      This method adds an header cell.
      Parameters:
      cellContent - The cell content cell, may be null.
    • toContainer

      public Container toContainer()
      This method creates a container structure for the build table.
      Returns:
      The container, never null.