In short, there is nothing preventing you from extending CellTable. It can be extended just like any other java class.
For example, Let us use a CellTable of such:
CellTable<Contact> table = new CellTable<Contact>();
TextColumn<Contact> nameColumn = new TextColumn<Contact>() { /* ... */ };
table.addColumn(nameColumn, "Name");
TextColumn<Contact> addressColumn = new TextColumn<Contact>() { /* ... */ };
table.addColumn(addressColumn, "Address");
table.setRowData( /* ... */ );
You could extract it into your own class like so:
public class MyCellTable extends CellTable<Contact>{
public MyCellTable(String col1, String col2){
TextColumn<Contact> nameColumn = new TextColumn<Contact>() { /* ... */ };
table.addColumn(nameColumn, col1);
TextColumn<Contact> addressColumn = new TextColumn<Contact>() { /* ... */ };
table.addColumn(addressColumn, col2);
}
}
By extending the CellTable, you can use your cell table like any other.
MyCellTable table = new MyCellTable("Name", "Address");
table.setRowData( /* ... */ );