Package com.vaadin.flow.component.html
Interface TableColumnSpan
- All Superinterfaces:
HasElement,Serializable
- All Known Implementing Classes:
TableColumn,TableColumnGroup
A table column definition carrying a
span attribute, i.e. either a
<col> or a <colgroup>, implemented by
TableColumn and TableColumnGroup.
A span tells the browser how many consecutive columns the definition
covers, so that one element can carry the styling or attributes of a range of
columns.
- Since:
- 25.3
-
Method Summary
Modifier and TypeMethodDescriptiondefault intgetSpan()Returns the value of thespanattribute.default booleanhasSpan()Reports whether this element carries an explicitspan, as opposed to falling back to the default of 1.default voidRemoves thespanattribute, restoring the default value of 1.default voidsetSpan(int span) Sets thespanattribute ? how many consecutive columns this element covers.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
setSpan
default void setSpan(int span) Sets thespanattribute ? how many consecutive columns this element covers. The default is1. Use it to apply the same styling or attributes across a range of columns without writing one element per column.- Parameters:
span- a positive integer.- Throws:
IllegalArgumentException- ifspanis less than 1.
-
getSpan
default int getSpan()Returns the value of thespanattribute.- Returns:
- the current span. Default is 1.
-
resetSpan
default void resetSpan()Removes thespanattribute, restoring the default value of 1. -
hasSpan
default boolean hasSpan()Reports whether this element carries an explicitspan, as opposed to falling back to the default of 1.- Returns:
trueif the attribute is set.
-