Interface GridLayout

All Superinterfaces:
Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, ComponentContainer, HasComponents, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasMargin, HasRequiredIndicator, HasSpacing, LayoutClickNotifier, ShortcutNotifier
All Known Implementing Classes:
GridLayoutImpl

@StudioComponent(caption="GridLayout", category="Containers", xmlElement="gridLayout", icon="io/jmix/ui/icon/container/gridLayout.svg", canvasBehaviour=CONTAINER, containerType=GRID, documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/containers/grid-layout.html") public interface GridLayout extends ComponentContainer, HasSpacing, HasMargin, Component.BelongToFrame, Component.HasIcon, Component.HasCaption, HasContextHelp, LayoutClickNotifier, ShortcutNotifier, HasHtmlCaption, HasHtmlDescription, HasRequiredIndicator, HasHtmlSanitizer
A layout where the components are laid out on a grid using cell coordinates.
  • Field Details

  • Method Details

    • getColumnExpandRatio

      float getColumnExpandRatio(int col)
    • setColumnExpandRatio

      void setColumnExpandRatio(int col, float ratio)
    • getRowExpandRatio

      float getRowExpandRatio(int row)
    • setRowExpandRatio

      void setRowExpandRatio(int row, float ratio)
    • add

      void add(Component component, int col, int row)
    • add

      void add(Component component, int col, int row, int col2, int row2)
    • getRows

      int getRows()
    • setRows

      void setRows(int rows)
    • getColumns

      int getColumns()
    • setColumns

      void setColumns(int columns)
    • getComponent

      @Nullable Component getComponent(int columnIndex, int rowIndex)
      Gets the Component at given row and column.
      Parameters:
      columnIndex - the column index, starting from 0 for the leftmost column.
      rowIndex - the row index, starting from 0 for the topmost row.
      Returns:
      Component in given cell or null if empty
    • getComponentNN

      default Component getComponentNN(int columnIndex, int rowIndex)
      Gets the Component at given row and column.
      Parameters:
      columnIndex - the column index, starting from 0 for the leftmost column.
      rowIndex - the row index, starting from 0 for the topmost row.
      Returns:
      component. Throws exception if not found.
    • getComponentArea

      @Nullable GridLayout.Area getComponentArea(Component component)
      Returns information about the area where given component is laid in the GridLayout.
      Parameters:
      component - the component whose area information is requested.
      Returns:
      an Area object that contains information how component is laid in the grid