Class AsciiDocTable
java.lang.Object
org.forgerock.api.markup.asciidoc.AsciiDocTable
AsciiDoc table builder [ref], which defers insertion
of the table, at the end of the parent document, until
tableEnd()
is called.
This class is not thread-safe.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Medium column-width (2xCOLUMN_WIDTH_SMALL
) for use withcolumnWidths(int...)
.static final int
Small column-width for use withcolumnWidths(int...)
. -
Method Summary
Modifier and TypeMethodDescriptioncolumnCell
(String columnCell) Inserts a column-cell.columnCell
(String columnCell, AsciiDocTableColumnStyles style) Inserts a column-cell, with a style.columnsPerRow
(int columnsPerRow) Sets number of columns per row, which is implicitly set byheaders(String...)
andcolumnWidths(int...)
.columnWidths
(int... columnWidths) Sets the widths for all columns-per-row, which can be a proportional integer (the default is 1) or a percentage (1 to 99).columnWidths
(List<Integer> columnWidths) Sets the widths for all columns-per-row, which can be a proportional integer (the default is 1) or a percentage (1 to 99).Sets the column headers, where blank entries can be null/empty, but the length of the headers array must be equal to the number of columns in the table.Sets the column headers, where blank entries can be null/empty, but the length of the headers array must be equal to the number of columns in the table.rowEnd()
Adds an optional space to visually delineate the end of a row in the generated markup.tableEnd()
Completes the table being built, and inserts it at the end of the parent document.Sets a table-title.
-
Field Details
-
COLUMN_WIDTH_SMALL
public static final int COLUMN_WIDTH_SMALLSmall column-width for use withcolumnWidths(int...)
.- See Also:
-
COLUMN_WIDTH_MEDIUM
public static final int COLUMN_WIDTH_MEDIUMMedium column-width (2xCOLUMN_WIDTH_SMALL
) for use withcolumnWidths(int...)
.- See Also:
-
-
Method Details
-
title
Sets a table-title.- Parameters:
title
- Table-title- Returns:
- Table builder
-
headers
Sets the column headers, where blank entries can be null/empty, but the length of the headers array must be equal to the number of columns in the table.- Parameters:
columnHeaders
- Column headers- Returns:
- Table builder
-
headers
Sets the column headers, where blank entries can be null/empty, but the length of the headers array must be equal to the number of columns in the table.- Parameters:
columnHeaders
- Column headers- Returns:
- Table builder
-
columnsPerRow
Sets number of columns per row, which is implicitly set byheaders(String...)
andcolumnWidths(int...)
.This value can only be set once.
- Parameters:
columnsPerRow
- Columns per row- Returns:
- Table builder
-
columnWidths
Sets the widths for all columns-per-row, which can be a proportional integer (the default is 1) or a percentage (1 to 99).- Parameters:
columnWidths
- An entry for each column-per row in value range [1,99]- Returns:
- Table builder
-
columnWidths
Sets the widths for all columns-per-row, which can be a proportional integer (the default is 1) or a percentage (1 to 99).- Parameters:
columnWidths
- An entry for each column-per row in value range [1,99]- Returns:
- Table builder
-
columnCell
Inserts a column-cell.- Parameters:
columnCell
- Column-cell ornull
for empty cell- Returns:
- Table builder
-
columnCell
Inserts a column-cell, with a style.- Parameters:
columnCell
- Column-cell ornull
for empty cellstyle
- Column-style- Returns:
- Table builder
-
rowEnd
Adds an optional space to visually delineate the end of a row in the generated markup. The intention is that this method would be called after adding all columns for a given row.- Returns:
- table builder
-
tableEnd
Completes the table being built, and inserts it at the end of the parent document.- Returns:
- Doc builder
-