Void when a table does not contain tabs
<table> element but has been
updated to render its content as a stream of <div> elements that rely on
CSS Grid Layout for styling.
This provides for more flexible layout options, such as splitting up table rows on
small displays.
The table should be used in three phases:
Predicate to identify the
rows to be shown for each tab. The
type parameter for the predicate is the type parameter T for the table.
The type parameter should be Void when the table is not configured
to use tabs.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static record |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private Content | |
| private List | |
| private Content | |
| private HtmlStyle | |
| private TableHeader | |
| private HtmlId | |
| private Set | |
| private boolean | |
| private final HtmlStyle | |
| private List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public Table | |
| private HtmlTree | |
| private HtmlTree | |
| private Content | |
| public boolean | Returns: true if the table has no rowsImplements abstract jdk. Returns whether the table is empty. |
| public Table | |
| public Table | Returns: this objectthe styles styles)Sets the styles for be used for the cells in each row. |
| public Table | Returns: this objectthe styles styles)Sets the styles for be used for the cells in each row. |
| public Table | Returns: this objectthe default tab label label)Sets the label for the default tab, which displays all the rows in the table. |
| public Table | Returns: this objectthe grid style gridStyle)Sets the style for the table's grid which controls allocation of space among table columns. |
| public Table | |
| public Table | |
| public Table | Returns: this objecttrue if table tabs should be rendered renderTabs)Allows to set whether tabs should be rendered for this table. |
| private Content | |
| public boolean | write(Writer out, String newline, boolean atNewline)
Implements abstract jdk. Writes content to a writer, using a given newline sequence, which should be
either |
| bodyRows | back to summary |
|---|---|
| private final List<Content> bodyRows | |
| caption | back to summary |
|---|---|
| private Content caption | |
| columnStyles | back to summary |
|---|---|
| private List<HtmlStyle> columnStyles | |
| defaultTab | back to summary |
|---|---|
| private Content defaultTab | |
| gridStyle | back to summary |
|---|---|
| private HtmlStyle gridStyle | |
| header | back to summary |
|---|---|
| private TableHeader header | |
| id | back to summary |
|---|---|
| private HtmlId id | |
| occurringTabs | back to summary |
|---|---|
| private Set<Table. | |
| renderTabs | back to summary |
|---|---|
| private boolean renderTabs | |
| tableStyle | back to summary |
|---|---|
| private final HtmlStyle tableStyle | |
| tabs | back to summary |
|---|---|
| private List<Table. | |
| Table | back to summary |
|---|---|
| public Table(HtmlStyle tableStyle) Creates a builder for an HTML element representing a table.
| |
| addRow | back to summary |
|---|---|
| public void addRow(Content... contents) Adds a row of data to the table.
Each item of content should be suitable for use as the content of a
| |
| addRow | back to summary |
|---|---|
| public void addRow(List<Content> contents) Adds a row of data to the table.
Each item of content should be suitable for use as the content of a
| |
| addRow | back to summary |
|---|---|
| public void addRow(T item, Content... contents) Adds a row of data to the table.
Each item of content should be suitable for use as the content of a
| |
| addRow | back to summary |
|---|---|
| public void addRow(T item, List<Content> contents) Adds a row of data to the table.
Each item of content should be suitable for use as the content of a
| |
| addTab | back to summary |
|---|---|
| public Table Adds a tab to the table. Tabs provide a way to display subsets of rows, as determined by a predicate for the tab, and an item associated with each row. Tabs will appear left-to-right in the order they are added. | |
| createTab | back to summary |
|---|---|
| private HtmlTree createTab(HtmlId tabId, HtmlStyle style, boolean defaultTab, Content tabLabel) | |
| getCaption | back to summary |
|---|---|
| private HtmlTree getCaption(Content title) | |
| getTableBody | back to summary |
|---|---|
| private Content getTableBody() | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements abstract jdk. Returns whether the table is empty. The table is empty if it has no (body) rows.
| |
| setCaption | back to summary |
|---|---|
| public Table Sets the caption for the table. This is ignored if the table is configured to provide tabs to select different subsets of rows within the table. | |
| setColumnStyles | back to summary |
|---|---|
| public Table Sets the styles for be used for the cells in each row. Note
| |
| setColumnStyles | back to summary |
|---|---|
| public Table Sets the styles for be used for the cells in each row. Note
| |
| setDefaultTab | back to summary |
|---|---|
| public Table Sets the label for the default tab, which displays all the rows in the table. This tab will appear first in the left-to-right list of displayed tabs. | |
| setGridStyle | back to summary |
|---|---|
| public Table Sets the style for the table's grid which controls allocation of space among table columns.
The style should contain a | |
| setHeader | back to summary |
|---|---|
| public Table Sets the header for the table. Notes
| |
| setId | back to summary |
|---|---|
| public Table Sets the id attribute of the table. This is required if the table has tabs, in which case a subsidiary id will be generated for the tabpanel. This subsidiary id is required for the ARIA support. | |
| setRenderTabs | back to summary |
|---|---|
| public Table Allows to set whether tabs should be rendered for this table. Some pages use their own controls to select table categories, in which case the tabs are omitted.
| |
| toContent | back to summary |
|---|---|
| private Content toContent() Returns the HTML for the table.
| |
| write | back to summary |
|---|---|
| public boolean write(Writer out, String newline, boolean atNewline) throws IOException Implements abstract jdk. Doc from jdk. Writes content to a writer, using a given newline sequence, which should be
either
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final Content | |
| private final Predicate | predicate
Record Component accessed by predicate(). |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public int | |
| public Content | |
| public Predicate | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| index | back to summary |
|---|---|
| private final int index Record Component accessed by index(). | |
| label | back to summary |
|---|---|
| private final Content label Record Component accessed by label(). | |
| predicate | back to summary |
|---|---|
| private final Predicate<T> predicate Record Component accessed by predicate(). | |
| Tab | back to summary |
|---|---|
| pack-priv Tab(Content label, Predicate<T> predicate, int index) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| index | back to summary |
|---|---|
| public int index() Record Component getter of index. | |
| label | back to summary |
|---|---|
| public Content label() Record Component getter of label. | |
| predicate | back to summary |
|---|---|
| public Predicate Record Component getter of predicate. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |