Interface TableColumnSpan

All Superinterfaces:
HasElement, Serializable
All Known Implementing Classes:
TableColumn, TableColumnGroup

@NullMarked public interface TableColumnSpan extends HasElement
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 Type
    Method
    Description
    default int
    Returns the value of the span attribute.
    default boolean
    Reports whether this element carries an explicit span, as opposed to falling back to the default of 1.
    default void
    Removes the span attribute, restoring the default value of 1.
    default void
    setSpan(int span)
    Sets the span attribute ? 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 the span attribute ? how many consecutive columns this element covers. The default is 1. 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 - if span is less than 1.
    • getSpan

      default int getSpan()
      Returns the value of the span attribute.
      Returns:
      the current span. Default is 1.
    • resetSpan

      default void resetSpan()
      Removes the span attribute, restoring the default value of 1.
    • hasSpan

      default boolean hasSpan()
      Reports whether this element carries an explicit span, as opposed to falling back to the default of 1.
      Returns:
      true if the attribute is set.