Class GridResponsiveStep<T>

  • Type Parameters:
    T - the data type for Grid
    All Implemented Interfaces:
    Serializable

    public class GridResponsiveStep<T>
    extends Object
    implements Serializable
    Class used in describing the responsive layouting behavior of a Grid
    See Also:
    Serialized Form
    • Method Detail

      • getMinWidth

        public int getMinWidth()
        Return the minimum width (in pixels) after which this responsive step is to be applied.
      • setItemDetailsRenderer

        public GridResponsiveStep<T> setItemDetailsRenderer​(Renderer<T> renderer)
        Set the renderer to use for displaying the item details rows when this responsive step is applied.
        Parameters:
        renderer - the renderer to use for displaying item details rows, null to use no detail renderer
        Returns:
        the instance of GridResponsiveStep for chaining method calls
        See Also:
        Grid.setItemDetailsRenderer(Renderer)
      • setItemDetailsRenderer

        public <C extends ComponentGridResponsiveStep<T> setItemDetailsRenderer​(@NonNull
                                                                                  @NonNull SerializableFunction<T,​C> componentFunction)
        Set the renderer to use for displaying the item details rows when this responsive step is applied.
        Type Parameters:
        C - the type of component returned by componentFunction
        Parameters:
        componentFunction - the function to set item details with a Component
        Returns:
        the instance of GridResponsiveStep for chaining method calls
        See Also:
        Grid.setItemDetailsRenderer(Renderer)
      • setColumns

        public GridResponsiveStep<T> setColumns​(Grid.Column<?>... columnsToShow)
        Set the columns that should be visible when this responsive step is applied.
        Parameters:
        columnsToShow - columns that should be visible
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • setColumns

        public GridResponsiveStep<T> setColumns​(List<Grid.Column<T>> columnsToShow)
        Set the columns that should be visible when this responsive step is applied.
        Parameters:
        columnsToShow - columns that should be visible
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • show

        public GridResponsiveStep<T> show​(Grid.Column<?>... columnsToShow)
        Show the given columns when this responsive step is applied.
        Parameters:
        columnsToShow - columns to show
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • show

        public GridResponsiveStep<T> show​(List<Grid.Column<T>> columnsToShow)
        Show the given columns when this responsive step is applied.
        Parameters:
        columnsToShow - the columns to show
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • hide

        public GridResponsiveStep<T> hide​(Grid.Column<?>... columnsToHide)
        Hide the given columns when this responsive step is applied.
        Parameters:
        columnsToHide - the columns to hide
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • hide

        public GridResponsiveStep<T> hide​(List<Grid.Column<T>> columnsToHide)
        Hide the given columns when this responsive step is applied.
        Parameters:
        columnsToHide - the columns to hide
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • hideAll

        public GridResponsiveStep<T> hideAll()
        Hide all the grid columns when this responsive step is applied.
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • showAll

        public GridResponsiveStep<T> showAll()
        Show all the grid columns when this responsive step is applied.
        Returns:
        the instance of GridResponsiveStep for chaining method calls
      • remove

        public void remove()
        Remove this responsive step and update the Grid.