Class Row

  • All Implemented Interfaces:
    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.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, Serializable

    @Tag("vaadin-board-row")
    @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.6.2") @NpmPackage(value="@vaadin/board",version="23.6.2") @NpmPackage(value="@vaadin/vaadin-board",version="23.6.2")
    @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/board/src/vaadin-board-row.js")
    public class Row
    extends com.vaadin.flow.component.Component
    implements com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasOrderedComponents
    Row class to define rows used in a Board instance.

    Each Row consists of four columns, and can contain up to four components taking one column each, or fewer components with multiple columns each as long as sum of columns stays less than or equal to four.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Row()
      Creates an empty row.
      Row​(com.vaadin.flow.component.Component... components)
      Creates an new row with the given components.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.vaadin.flow.component.Component... components)
      Adds the given component(s) to the row.
      void add​(com.vaadin.flow.component.Component component, int cols)
      Adds the given component to the row using the given number of columns.
      void addNestedRow​(Row row)
      Adds the given row as a nested row to the current row.
      int getComponentSpan​(com.vaadin.flow.component.Component component)
      Gets the number of columns the given component spans.
      void setComponentSpan​(com.vaadin.flow.component.Component component, int columns)
      Sets the number of columns the given component spans.
      • 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, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

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

        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.HasOrderedComponents

        getChildren, getComponentAt, getComponentCount, indexOf, replace
      • 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
    • Constructor Detail

      • Row

        public Row​(com.vaadin.flow.component.Component... components)
        Creates an new row with the given components.
        Parameters:
        components - initial content of the row
    • Method Detail

      • add

        public void add​(com.vaadin.flow.component.Component... components)
        Adds the given component(s) to the row.

        All added components are set to use 1 column. Use setComponentSpan(Component, int) to make a component span multiple columns.

        Specified by:
        add in interface com.vaadin.flow.component.HasComponents
        Parameters:
        components - the components to add
      • add

        public void add​(com.vaadin.flow.component.Component component,
                        int cols)
        Adds the given component to the row using the given number of columns.
        Parameters:
        component - the component to add
        cols - the number of columns the component should use
      • addNestedRow

        public void addNestedRow​(Row row)
        Adds the given row as a nested row to the current row.
        Parameters:
        row - the row to add as a nested row
      • getComponentSpan

        public int getComponentSpan​(com.vaadin.flow.component.Component component)
        Gets the number of columns the given component spans.
        Parameters:
        component - the child component to get columns for
        Returns:
        the number of columns the component spans, by default 1.
      • setComponentSpan

        public void setComponentSpan​(com.vaadin.flow.component.Component component,
                                     int columns)
        Sets the number of columns the given component spans.
        Parameters:
        component - the child component to set columns for
        columns - the number of columns the component spans