Skip to content
Snippets Groups Projects
Commit 311116ea authored by Goik Martin's avatar Goik Martin
Browse files

Working row groups delimeter example

parent 208ea4ee
No related branches found
No related tags found
No related merge requests found
...@@ -33,8 +33,24 @@ public class HelloUi extends UI { ...@@ -33,8 +33,24 @@ public class HelloUi extends UI {
setContent(mainLayout); // Attach to the UI setContent(mainLayout); // Attach to the UI
final Table table = new Table("Sudoku"); final Table table = new Table("Sudoku");
table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN); mainLayout.addComponent(table);
mainLayout.addComponent(table);
table.setCellStyleGenerator(new Table.CellStyleGenerator() {
private static final long serialVersionUID = 2901054012453350566L;
@Override
public String getStyle(Table source, Object itemId, Object propertyId) {
int row = ((Integer)itemId).intValue();
if (2 == row % 3) {
return "sudokugroup";
} else {
return null;
}
}
});
table.setColumnHeaderMode(Table.ColumnHeaderMode.HIDDEN);
table.setEditable(true); table.setEditable(true);
table.setImmediate(true); table.setImmediate(true);
...@@ -60,7 +76,7 @@ public class HelloUi extends UI { ...@@ -60,7 +76,7 @@ public class HelloUi extends UI {
t.setPropertyDataSource(board.cells[y][x]); t.setPropertyDataSource(board.cells[y][x]);
} }
table.addItem(tf, y); table.addItem(tf, new Integer(y));
} }
} }
......
../../../../webapp/VAADIN/themes/sudoku/styles.css
\ No newline at end of file
$color: #FF0000;
@import "../valo/valo"; @import "../valo/valo";
.sudoku { .sudoku {
@include valo; @include valo;
.v-table-cell-content-sudokugroup {
border-bottom: 1px solid #000;
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment