Class GridLayout

  • 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("grid-layout")
    public class GridLayout
    extends com.vaadin.flow.component.Component
    implements com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasSize
    Grid Layout Component use the CSS Grid Layout to align elements into columns and rows.
    Author:
    Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GridLayout.Alignment  
    • Constructor Summary

      Constructors 
      Constructor Description
      GridLayout()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.vaadin.flow.component.Component component, int columnStart, int rowStart)
      Adds a grid item.
      void add​(com.vaadin.flow.component.Component component, int columnStart, int rowStart, int columnEnd, int rowEnd)
      Adds a grid item.
      void setAlignSelf​(GridLayout.Alignment alignment, com.vaadin.flow.component.Component component)  
      void setGridTemplateColumns​(int columns)
      Sets the grid template columns.
      void setJustifySelf​(GridLayout.Alignment alignment, com.vaadin.flow.component.Component component)  
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, 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, 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

      • GridLayout

        public GridLayout()
    • Method Detail

      • setGridTemplateColumns

        public void setGridTemplateColumns​(int columns)
        Sets the grid template columns.
        Parameters:
        columns - Number of columns in the grid.
      • setJustifySelf

        public void setJustifySelf​(GridLayout.Alignment alignment,
                                   com.vaadin.flow.component.Component component)
      • setAlignSelf

        public void setAlignSelf​(GridLayout.Alignment alignment,
                                 com.vaadin.flow.component.Component component)
      • add

        public void add​(com.vaadin.flow.component.Component component,
                        int columnStart,
                        int rowStart)
        Adds a grid item.
        Parameters:
        component - Grid item.
        columnStart - Specifies where to start the component.
        rowStart - Specifies where to start the component.
      • add

        public void add​(com.vaadin.flow.component.Component component,
                        int columnStart,
                        int rowStart,
                        int columnEnd,
                        int rowEnd)
        Adds a grid item.
        Parameters:
        component - Grid item.
        columnStart - Specifies where to start the component.
        rowStart - Specifies where to start the component.
        columnEnd - Specifies where to end the component.
        rowEnd - Specifies where to end the component.