Interface Grid<G extends Grid<G>>

All Superinterfaces:
Comparable<G>, Component<G>, Copyable<G>, CustomCssComponent<G>, Serializable
All Known Subinterfaces:
ActionGrid<G>, EntityGridView<V>, ExportGrid<G>, ExportHistoryEntityGridView<V>, ExportHistoryGrid<G>, ExportHistoryGridExternal<E>, FetchGrid<G>, FieldArrayGridField<F>, FilterableGrid<G>, GridExternal<E>, GridView<V>, ImportGrid<G>, LookupFieldModal<V>, Orderable<R>, ResidentGridField<F>, ResidentMapField<F>, ResourceGrid<G>, SelectTargetEntityGridView<V>, SortableGrid<G>, TreeGridView<V>
All Known Implementing Classes:
DefaultEntityGridView, DefaultExportHistoryEntityGridView, DefaultExportHistoryGridExternal, DefaultFieldArrayGridField, DefaultGridExternal, DefaultLookupFieldModal, DefaultResidentGridField, DefaultResidentMapField, DefaultSelectTargetEntityGridView, DefaultTreeGridView

public interface Grid<G extends Grid<G>> extends CustomCssComponent<G>
An interface representing a grid with a collection of Column.
Author:
Nick Crum (ncrum)
  • Method Details

    • 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
    • addRowMessage

      default G addRowMessage(String id, Message<?> message)
    • addRowMessage

      default G addRowMessage(Message<?> message)
    • removeRowMessage

      default G removeRowMessage(String id)
    • rowMessage

      default G rowMessage(String id, UnaryOperator<Message<?>> fn)
    • findRowMessage

      default Optional<Message<?>> findRowMessage(String id)
    • getRowMessage

      default Message<?> getRowMessage(String id)