com.vaadin.flow.component.gridpro.testbench.

Class GridProElement

    • Constructor Detail

      • GridProElement

        public GridProElement()
    • Method Detail

      • scrollToRow

        public void scrollToRow(int row)

        Scrolls to the row with the given index.

        Parameters:

        row - the row to scroll to

      • getFirstVisibleRowIndex

        public int getFirstVisibleRowIndex()

        Gets the index of the first row which is at least partially visible.

        Returns:

        the index of the first visible row

      • getCell

        public GridTHTDElement getCell(int rowIndex,
                                       int colIndex)

        Gets the grid cell for the given row and column index.

        For the column index, only visible columns are taken into account.

        Automatically scrolls the given row into view

        Parameters:

        rowIndex - the row index

        colIndex - the column index

        Returns:

        the grid cell for the given coordinates

      • getCell

        public GridTHTDElement getCell(int rowIndex,
                                       GridProColumnElement column)

        Gets the grid cell for the given row and column.

        Automatically scrolls the given row into view

        Parameters:

        rowIndex - the row index

        column - the column element for the column

        Returns:

        the grid cell for the given coordinates

      • getLastVisibleRowIndex

        public int getLastVisibleRowIndex()

        Gets the index of the last row which is at least partially visible.

        Returns:

        the index of the last visible row

      • getRow

        public GridTRElement getRow(int rowIndex)

        Gets the tr element for the given row index.

        Parameters:

        rowIndex - the row index

        Returns:

        the tr element for the row

      • generatedColumnIdsIfNeeded

        protected void generatedColumnIdsIfNeeded()
      • getVisibleColumns

        public List<GridProColumnElement> getVisibleColumns()

        Gets the currently visible columns in the grid, including any selection checkbox column.

        Returns:

        a list of grid column elements which can be used to refer to the given column