com.vaadin.flow.component.

Class HtmlContainer

All Implemented Interfaces:

AttachNotifier, DetachNotifier, HasComponents, HasElement, HasEnabled, HasSize, HasStyle, HasText, Serializable

Direct Known Subclasses:

Anchor, Article, Aside, DescriptionList, DescriptionList.Description, DescriptionList.Term, Div, Emphasis, FieldSet, FieldSet.Legend, Footer, H1, H2, H3, H4, H5, H6, Header, HtmlObject, Image, Label, ListItem, Main, NativeButton, NativeDetails.Summary, NativeLabel, NativeTable, NativeTableBody, NativeTableCaption, NativeTableCell, NativeTableFooter, NativeTableHeader, NativeTableHeaderCell, NativeTableRow, Nav, OrderedList, Paragraph, Pre, Section, Span, UnorderedList

public class HtmlContainer extends HtmlComponent implements HasComponents, HasText

Base class for a Component that represents a single built-in HTML element that can contain child components or text.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Constructor Details

    • HtmlContainer

      protected HtmlContainer()

      Creates an empty component with the element determined by the Tag annotation of a sub class.

    • HtmlContainer

      protected HtmlContainer(Component... components)

      Creates a component with the given child components. The element is determined by the Tag annotation of a sub class.

      Parameters:

      components - the child components

    • HtmlContainer

      public HtmlContainer(String tagName)

      Creates a new empty component with a new element with the given tag name.

      Parameters:

      tagName - the tag name of the element to use for this component, not null

    • HtmlContainer

      public HtmlContainer(String tagName, Component... components)

      Creates a new component with the given contents and a new element with the given tag name.

      Parameters:

      tagName - the tag name of the element to use for this component, not null

      components - the child components