DisplayKeywords.TABLE);
rule.setProperties(styleProperties);
styleSheet.addRule(rule);
Grid grid = (Grid) format;
// Handle the columns.
int columns = grid.getColumns();
for (int c = 0; c < columns; c += 1) {
Column column = grid.getColumn(c);
addColumnRules(styleSheet, column);
}
// Handle the rows.
int rows = grid.getRows();
for (int r = 0; r < rows; r += 1) {
Row row = grid.getRow(r);
addRowRules(styleSheet, row);
}
// Handle the cells.
for (int r = 0; r < rows; r += 1) {
Row row = grid.getRow(r);
for (int c = 0; c < columns; c += 1) {
Format child = grid.getChildAt(r, c);
addCellRules(styleSheet, grid, row, c, child);
}
}
}