Class Cell

  • All Implemented Interfaces:
    StyleTarget

    public class Cell
    extends Element
    implements StyleTarget
    A class representing a single cell in an HTML table.

    Cells can have differing row and column spans, can have CSS classes or styles, and have content. The content can be either a list or a string, which will be rendered differently.

    You can also specify that string content is HTML, which will be inserted as-is without escaping. Be careful to not present an opportunity for script injection if you use this.

    • Method Detail

      • of

        public static Cell of​(Object content,
                              CellOption... options)
                       throws sailpoint.tools.GeneralException
        Constructs a new Cell that can be passed to Table.cell(Cell)
        Parameters:
        content - The content of the cell
        options - The cell options
        Returns:
        The constructed Cell
        Throws:
        sailpoint.tools.GeneralException
      • of

        public static Cell of​(Object content,
                              List<CellOption> options)
                       throws sailpoint.tools.GeneralException
        Constructs a new Cell that can be passed to Table.cell(Cell)
        Parameters:
        content - The content of the cell
        options - The cell options
        Returns:
        The constructed Cell
        Throws:
        sailpoint.tools.GeneralException
      • isHtml

        public boolean isHtml()
      • render

        public void render​(StringBuilder builder,
                           Row parent)
        Renders this cell to HTML, inserting it into the builder
      • setColspan

        public void setColspan​(int colspan)
      • setHeader

        public void setHeader​(boolean header)
      • setHtml

        public void setHtml​(boolean html)
      • setRowspan

        public void setRowspan​(int rowspan)