You're viewing an older version of Framework JavaDoc. Please see version 7.7.46 for the latest.
com.vaadin.client.widget.grid.selection.

Interface SelectionModel<T>

    • Nested Class Summary

      Nested Classes
      Modifier and Type Interface Description
      static interface  SelectionModel.Multi<T>

      Selection model that allows for several rows to be selected at once.

      static interface  SelectionModel.None<T>

      Interface for a selection model that does not allow anything to be selected.

      static interface  SelectionModel.Single<T>

      Selection model that allows a maximum of one row to be selected at any one time.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      Collection<T> getSelectedRows()

      Returns a Collection containing all selected rows.

      Renderer<Boolean> getSelectionColumnRenderer()

      Return the Renderer responsible for rendering the selection column.

      boolean isSelected​(T row)

      Return true if the provided row is considered selected under the implementing selection model.

      void reset()

      Resets the SelectionModel to the initial state.

      void setGrid​(Grid<T> grid)

      Tells this SelectionModel which Grid it belongs to.

    • Method Detail

      • isSelected

        boolean isSelected​(T row)

        Return true if the provided row is considered selected under the implementing selection model.

        Parameters:

        row - row object instance

        Returns:

        true, if the row given as argument is considered selected.

      • getSelectionColumnRenderer

        Renderer<Boolean> getSelectionColumnRenderer()

        Return the Renderer responsible for rendering the selection column.

        Returns:

        a renderer instance. If null is returned, a selection column will not be drawn.

      • setGrid

        void setGrid​(Grid<T> grid)

        Tells this SelectionModel which Grid it belongs to.

        Implementations are free to have this be a no-op. This method is called internally by Grid.

        Parameters:

        grid - a Grid instance; null when removing from Grid

      • reset

        void reset()

        Resets the SelectionModel to the initial state.

        This method can be called internally, for example, when the attached Grid's data source changes.

      • getSelectedRows

        Collection<T> getSelectedRows()

        Returns a Collection containing all selected rows.

        Returns:

        a non-null collection.