Package com.vaadin.flow.component.html
Class TableColumn
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.html.TableColumn
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasSize,HasStyle,TableColumnSpan,Serializable
Component representing a
<col> element ? a column (or
range of columns, via TableColumnSpan.setSpan(int)) inside a
TableColumnGroup. Use it to apply column-wide styling without
repeating it on every cell: a class or id on a <col> can target all
the data cells in that column.
<col> is a void element (no children, no end tag) and is only valid
inside a <colgroup> that does not itself carry a span
attribute. Only a limited subset of CSS applies to columns:
background, border (with border-collapse: collapse),
visibility: collapse and width. Text and font properties do
not inherit into the cells ? style those on <td> or
<th> instead.
- Since:
- 25.3
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new column component spanning a single column.TableColumn(int span) Creates a new column component spanning the given number of columns. -
Method Summary
Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.html.TableColumnSpan
getSpan, hasSpan, resetSpan, setSpan
-
Constructor Details
-
TableColumn
public TableColumn()Creates a new column component spanning a single column. -
TableColumn
public TableColumn(int span) Creates a new column component spanning the given number of columns.- Parameters:
span- the number of consecutive columns this<col>element applies to. Must be a positive integer.
-