Package com.vaadin.flow.component.html
Enum Class TableHeaderCell.Scope
- All Implemented Interfaces:
Serializable,Comparable<TableHeaderCell.Scope>,Constable
- Enclosing class:
TableHeaderCell
Defines the cells that a
<th> header relates to ?
effectively the answer to "which other cells does this header label?".
Setting it correctly is what lets a screen reader read out the right
column or row header when a user navigates into a data cell.
If no scope is set (or the value is unrecognized), browsers automatically
infer the scope from the table structure. Per the HTML
spec, the standard keywords are row, col,
rowgroup, and colgroup; auto writes the literal "auto" attribute value, which browsers
treat the same as omitting the attribute.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWrites the literal"auto"value.The header relates to all cells of the column it belongs to.The header belongs to a column group (TableColumnGroup) and relates to all cells in that group.The header relates to all cells of the row it belongs to.The header belongs to a row group (<tbody>or<thead>/<tfoot>) and relates to all cells in that group. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the attribute value as it appears in the rendered HTML.static TableHeaderCell.ScopeReturns the enum constant of this class with the specified name.static TableHeaderCell.Scope[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROW
The header relates to all cells of the row it belongs to. Use this for a leading<th>that labels its row (e.g. the row's name or category). -
COL
The header relates to all cells of the column it belongs to. Use this for a header at the top of a column (the most common case in<thead>). -
ROWGROUP
The header belongs to a row group (<tbody>or<thead>/<tfoot>) and relates to all cells in that group. -
COLGROUP
The header belongs to a column group (TableColumnGroup) and relates to all cells in that group. -
AUTO
Writes the literal"auto"value. Behaves the same as leaving the attribute unset ? the browser infers the scope from the table structure.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the attribute value as it appears in the rendered HTML.- Returns:
- the
scopeattribute value.
-