The cell table widgets in GWT use a client bundle to store all the required resources. This is great in reducing the number of round-trips for loading the required css and image resources, and allows us to place images and css fragments where they belong: close to the components.
But how do we change the styles? Simply subclass the client bundle, replace the images/ styles partially or completely, and they give it to the cell widget.
Here is a small example:
1 2 3 4 5 |
interface TableResources extends DataGrid.Resources { @Override @Source(value = {DataGrid.Style.DEFAULT_CSS, "DataGridPatch.css"}) DataGrid.Style dataGridStyle(); } |
Now, you have to create the cell table:
1 2 3 4 5 6 |
@UiField(provided = true) DataGrid<Company> table; (...) table = new DataGrid<Comapany>(numRows, GWT.<TableResources> create(TableResources.class)); (...) |