Class VerticalLayout

All Implemented Interfaces:
LayoutEvents.LayoutClickNotifier, ClientConnector, Sizeable, ComponentContainer, HasComponents, HasComponents.ComponentAttachDetachNotifier, Layout.AlignmentHandler, Layout.MarginHandler, com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasStyle, Serializable, Iterable<com.vaadin.flow.component.Component>

@Tag("div") @CssImport("./ordered-layout.css") @CssImport("./margin.css") public class VerticalLayout extends AbstractOrderedLayout
Legacy version of VerticalLayout that resembles Vaadin 7/8's VerticalLayout API as closely as possible in order to facilitate migration to newer versions of Vaadin.

VerticalLayout is a component container, which shows the subcomponents in the order of their addition (vertically). A vertical layout is by default 100% wide.

Author:
Vaadin Ltd.
See Also:
  • Constructor Details

    • VerticalLayout

      public VerticalLayout()
      Constructs an empty VerticalLayout.
    • VerticalLayout

      public VerticalLayout(com.vaadin.flow.component.Component... children)
      Constructs a VerticalLayout with the given components. The components are added in the given order.
      Parameters:
      children - The components to add.
      See Also:
  • Method Details

    • addComponentsAndExpand

      public void addComponentsAndExpand(com.vaadin.flow.component.Component... components)
      Adds the given components to this layout and sets them as expanded. The height of this layout is set to 100% if it is currently undefined.

      The components are added in the provided order to the end of this layout. Any components that are already children of this layout will be moved to new positions.

      Overrides:
      addComponentsAndExpand in class AbstractOrderedLayout
      Parameters:
      components - the components to set, not null