Provides implementations of standard Swing models and objects that use Functors as a means of varying behaviour at construction.
See: Description
Class Summary | |
---|---|
GenericListCellRenderer<T,R> | ListCellRenderer that passes the contents through a functor to render the contents, instead of calling toString() on the contents. |
GenericTableModel<T> | TableModel that uses a pair of lists: one containing a list of objects representing the rows in the table and one containing a list of functors that will be used to determine the value for each column. |
GenericTableModel.Column<R,C> | |
SpreadsheetTableModel | TableModel that uses a sparse matrix of functors. |
For example, JTables are frequently used as little more than multi-column list controls: they are configured to be non-updatable, and are used solely as a source of selection events. They're used in this way because they are more powerful than JList controls in the range of display logic that they support. Configuring tables in this way usually requires a fairly boilerplate TableModel implementation.
GenericTableModel allows the programmer to build a TableModel from a list of data and a few functors. This is intended to eliminate (or at least greatly reduce) the boilerplate coding.
The classes in this package are at varying degrees of completeness, and more classes are expected to be added here in the coming releases. There will be classes for use with JTrees for example, and more Renderer and possibly Editor classes are likely.