Class TableColumn

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable

    @Tag("col")
    public class TableColumn
    extends com.vaadin.flow.component.Component
    implements com.vaadin.flow.component.HasStyle
    Represents a table column element (<col>). A column is contained in a column group and can setup table columns.
    Author:
    Stefan Uebe
    See Also:
    TableColumnGroup, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TableColumn()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSpan()
      Returns the span attribute for this column.
      void resetSpan()
      Resets the span to its default (1).
      void setSpan​(int span)
      Sets the column span.
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasStyle

        addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
    • Constructor Detail

      • TableColumn

        public TableColumn()
    • Method Detail

      • setSpan

        public void setSpan​(int span)
        Sets the column span. That column span defines how styles of the column's css class will cover related cells. It does not override the cell's colspan attribute.

        Must be a positive integer
        Parameters:
        span - span
      • getSpan

        public int getSpan()
        Returns the span attribute for this column. Default is 1, if none has been set for this instance.
        Returns:
        span
      • resetSpan

        public void resetSpan()
        Resets the span to its default (1).