PropertyColumnTableDescription is the default implementation of {@link TableDescription} which uses classintrospection to create columns. Each column is based on a property of the class and thus should be accessible through an isXXX or getXXX method.
Additionally writing capabilities are available by providing a specific {@link javax.swing.table.TableCellEditor}. When using this table description with a detail form and a backing formModel, take a look at the {@link ValueModelTableCellEditor}.
Nested properties can be accessed using the dot notation: 'propertyA.propertyB'. At any point in this chaining getting a null value will stop evaluating the expression and returns null.
Typical usage of a {@link PropertyColumnTableDescription}:PropertyColumnTableDescription tableDesc = new PropertyColumnTableDescription("id", MyType.class); tableDesc.addPropertyColumn("propertyA"); tableDesc.addPropertyColumn("propertyB").addRenderer(MySpecificTableCellRenderer); tableDesc.addPropertyColumn("propertyC").addMinWidth(25).addMaxWidth(100);
More possibilities and additional addXXX methods can be found in the {@link PropertyColumn} class.
NOTE: this class provides a number of addPropertyColumn(...) methods to add columns. As there are many features on a column, this led to a huge number of these constructions. To simplify the {@link PropertyColumnTableDescription} class and the adding of new features, a new way of column creationhas been implemented with the addXXX methods on the {@link PropertyColumn} class. New features will beexclusive to the addXXX methods.
|
|
|
|
|
|