Package com.vaadin.flow.component.html
Class NativeTableCell
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.NativeTableCell
- All Implemented Interfaces:
AttachNotifier
,ClickNotifier<NativeTableCell>
,DetachNotifier
,HasComponents
,HasElement
,HasEnabled
,HasSize
,HasStyle
,HasText
,Serializable
@Tag("td")
public class NativeTableCell
extends HtmlContainer
implements ClickNotifier<NativeTableCell>
Component representing a
<td>
element.- Since:
- 24.4
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
HasText.WhiteSpace
-
Constructor Summary
ConstructorDescriptionCreates a new empty table cell component.NativeTableCell
(Component... components) Creates a new table cell with the given children components.NativeTableCell
(String text) Creates a new table cell with the given text. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the colspan value of this cell.int
Returns the rowspan value of this cell.void
Reset colspan to its default value of 1.void
Resets the rowspan to its default value of 1.void
setColspan
(int colspan) Set the colspan of this cell.void
setRowspan
(int rowspan) Sets the rowspan for this cell.Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitle
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.HasText
getText, getWhiteSpace, setText, setWhiteSpace
-
Constructor Details
-
NativeTableCell
public NativeTableCell()Creates a new empty table cell component. -
NativeTableCell
Creates a new table cell with the given children components.- Parameters:
components
- the children components.
-
NativeTableCell
Creates a new table cell with the given text.- Parameters:
text
- the text.
-
-
Method Details
-
setColspan
public void setColspan(int colspan) Set the colspan of this cell.- Parameters:
colspan
- a non-negative integer value that indicates how many columns the data cell spans or extends.
-
getColspan
public int getColspan()Returns the colspan value of this cell.- Returns:
- the current value of the colspan attribute. Default is 1.
-
resetColspan
public void resetColspan()Reset colspan to its default value of 1. -
setRowspan
public void setRowspan(int rowspan) Sets the rowspan for this cell.- Parameters:
rowspan
- a non-negative integer value that indicates for how many rows the data cell spans or extends. If its value is set to 0, it extends until the end of the table grouping section (<thead>
,<tbody>
,<tfoot>
, even if implicitly defined), that the cell belongs to.
-
getRowspan
public int getRowspan()Returns the rowspan value of this cell.- Returns:
- the current value of the rowspan attribute. Default is 1.
-
resetRowspan
public void resetRowspan()Resets the rowspan to its default value of 1.
-