Interface TableMapDataSource<E>

Type Parameters:
E - The type of the table entry Objects.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TableMapDataSource<E>
A simple functional interface whose implementations are used to form simple TableModel implementations based on a mapping of column names to columns.

Note that TableData is the recommended way of modelling a table in SwingTree. It is a single immutable value describing the whole table (cells, column names, column classes, cell order and editability), which you hold in a Var property and bind through UIFactoryMethods.table(sprouts.Var). A table bound like that updates itself, is thread safe by construction, and syncs row changes to the JTable incrementally rather than rebuilding it. A pull based data source like this one, by contrast, has to be told when to refresh (see updateTableOn(..)), and can only ever refresh everything.

  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Supplies a map of columns forming a matrix which will be used to render a table.
  • Method Details

    • get

      Map<String,List<E>> get()
      Supplies a map of columns forming a matrix which will be used to render a table. It is called continuously by the table model to populate the table, so the implementation should avoid doing heavy computations, I/O operations or large allocations.
      Returns:
      A map of columns forming a matrix which will be used to populate the table.