Class Cell
- java.lang.Object
-
- com.identityworksllc.iiq.common.table.Element
-
- com.identityworksllc.iiq.common.table.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.
-
-
Field Summary
-
Fields inherited from class com.identityworksllc.iiq.common.table.Element
cssClasses, style
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColspan()ObjectgetContent()intgetRowspan()booleanisHeader()booleanisHtml()static Cellof(Object content, CellOption... options)Constructs a new Cell that can be passed toTable.cell(Cell)static Cellof(Object content, List<CellOption> options)Constructs a new Cell that can be passed toTable.cell(Cell)voidrender(StringBuilder builder, Row parent)Renders this cell to HTML, inserting it into the buildervoidsetColspan(int colspan)voidsetContent(Object content)voidsetHeader(boolean header)voidsetHtml(boolean html)voidsetRowspan(int rowspan)-
Methods inherited from class com.identityworksllc.iiq.common.table.Element
getCssClasses, getEscapedCssClassAttr, getEscapedStyle, getStyle, setCssClasses, setStyle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.identityworksllc.iiq.common.table.StyleTarget
getCssClasses, getStyle, setCssClasses, setStyle
-
-
-
-
Method Detail
-
of
public static Cell of(Object content, CellOption... options) throws sailpoint.tools.GeneralException
Constructs a new Cell that can be passed toTable.cell(Cell)- Parameters:
content- The content of the celloptions- 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 toTable.cell(Cell)- Parameters:
content- The content of the celloptions- The cell options- Returns:
- The constructed Cell
- Throws:
sailpoint.tools.GeneralException
-
getColspan
public int getColspan()
-
getContent
public Object getContent()
-
getRowspan
public int getRowspan()
-
isHeader
public boolean isHeader()
-
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)
-
setContent
public void setContent(Object content)
-
setHeader
public void setHeader(boolean header)
-
setHtml
public void setHtml(boolean html)
-
setRowspan
public void setRowspan(int rowspan)
-
-