Interface FluentHasComponents<S extends FluentHasComponents<S>>

All Superinterfaces:
com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, Serializable
All Known Subinterfaces:
FluentHtmlContainer<S>
All Known Implementing Classes:
ConfirmationDialog, HorizontalFloatLayout, NavigationView, SecondaryText, VAnchor, VArticle, VAside, VCode, VDescriptionList, VDialog, VDiv, VEmphasis, VFlexLayout, VFooter, VFormLayout, VH1, VH2, VH3, VH4, VH5, VH6, VHeader, VHorizontalLayout, VHr, VImage, VListItem, VMain, VNativeButton, VNav, VNotification, VOrderedList, VParagaph, VSection, VSelect, VSpan, VTab, VTabs, VUnorderedList, VVerticalLayout

public interface FluentHasComponents<S extends FluentHasComponents<S>> extends com.vaadin.flow.component.HasComponents
  • Method Summary

    Modifier and Type
    Method
    Description
    default S
    addAfter(com.vaadin.flow.component.Component reference, com.vaadin.flow.component.Component... components)
    Adds the given components right after the reference component, in the given order.
    default S
    addBefore(com.vaadin.flow.component.Component reference, com.vaadin.flow.component.Component... components)
    Adds the given components right before the reference component, in the given order.
    default Stream<com.vaadin.flow.component.Component>
     
    default Stream<com.vaadin.flow.component.Component>
     
    default S
    withComponentAsFirst(com.vaadin.flow.component.Component component)
     
    default S
    withComponentAtIndex(int index, com.vaadin.flow.component.Component component)
     
    default S
    withComponents(com.vaadin.flow.component.Component... components)
     

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add

    Methods inherited from interface com.vaadin.flow.component.HasComponentsOfType

    add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replace

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

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled, setEnabled
  • Method Details

    • withComponents

      default S withComponents(com.vaadin.flow.component.Component... components)
    • withComponentAsFirst

      default S withComponentAsFirst(com.vaadin.flow.component.Component component)
    • withComponentAtIndex

      default S withComponentAtIndex(int index, com.vaadin.flow.component.Component component)
    • addBefore

      default S addBefore(com.vaadin.flow.component.Component reference, com.vaadin.flow.component.Component... components)
      Adds the given components right before the reference component, in the given order. Components that are already children of this container are moved.
      Parameters:
      reference - an existing child of this container
      components - the components to add
      Returns:
      this for chaining
      Throws:
      IllegalArgumentException - if reference is not a child of this container, or is one of the components to add
    • addAfter

      default S addAfter(com.vaadin.flow.component.Component reference, com.vaadin.flow.component.Component... components)
      Adds the given components right after the reference component, in the given order. Components that are already children of this container are moved.
      Parameters:
      reference - an existing child of this container
      components - the components to add
      Returns:
      this for chaining
      Throws:
      IllegalArgumentException - if reference is not a child of this container, or is one of the components to add
    • children

      default Stream<com.vaadin.flow.component.Component> children()
      Returns:
      all child components, including ones nested in wrappers that don't implement HasComponents and virtual children (slotted components, overlays). Backed by ComponentUtil.getAllChildren(Component).
    • descendants

      default Stream<com.vaadin.flow.component.Component> descendants()
      Returns:
      all descendant components (not including this one) in pre-order, including virtual children. Backed by ComponentUtil.streamDescendants(Component).