Interface Grid<G extends Grid<G>>

    • Method Detail

      • idKey

        default G idKey​(String idKey)
        Define the property used as the unique identifier for the data in a row. Defaults to "id" in the client.
        Parameters:
        idKey - the id field
        Returns:
        this
      • addColumns

        default G addColumns​(Collection<Column<?>> columns)
        Adds a collection of columns to this grid.
        Parameters:
        columns - the columns to add
        Returns:
        this
      • addColumn

        default G addColumn​(String name,
                            Column<?> column)
        Adds a column with the given property name to this grid.
        Parameters:
        name - the name of the property
        column - the column
        Returns:
        this
      • addColumn

        default G addColumn​(Column<?> column)
        Adds a column to this grid.
        Parameters:
        column - the column
        Returns:
        this
      • addColumn

        default G addColumn​(String name)
        Adds a string column with the given name to this grid. Capitalizes the provided name as the label for the column.
        Parameters:
        name - the name of the property
        Returns:
        this
      • removeColumn

        default G removeColumn​(String name)
        Removes the column with the given name.
        Parameters:
        name - the column name
        Returns:
        this
      • getColumn

        default Column<?> getColumn​(String name)
        Retrieves the column with the given property name, if it exists.
        Parameters:
        name - the name of the property
        Returns:
        the column
        Throws:
        IllegalArgumentException - if no component is found with that key
      • findColumn

        default Optional<Column<?>> findColumn​(String name)
        Finds the column with the given property name.
        Parameters:
        name - the name of the property
        Returns:
        an optional with the column, or empty