From 52c4b1905e311f72fdf8080a1917e87c30355a61 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 4 Sep 2012 09:38:38 +0300 Subject: ItemStyleGenerator.getStyle now includes source component (#5822) --- server/src/com/vaadin/ui/Table.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'server/src/com/vaadin/ui/Table.java') diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 5eb18ee61f..65189fed0c 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -3479,8 +3479,8 @@ public class Table extends AbstractSelect implements Action.Container, * target. */ if (cellStyleGenerator != null) { - String cellStyle = cellStyleGenerator - .getStyle(itemId, columnId); + String cellStyle = cellStyleGenerator.getStyle(this, itemId, + columnId); if (cellStyle != null && !cellStyle.equals("")) { target.addAttribute("style-" + columnIdMap.key(columnId), cellStyle); @@ -3567,7 +3567,7 @@ public class Table extends AbstractSelect implements Action.Container, * to the target. */ if (cellStyleGenerator != null) { - String rowStyle = cellStyleGenerator.getStyle(itemId, null); + String rowStyle = cellStyleGenerator.getStyle(this, itemId, null); if (rowStyle != null && !rowStyle.equals("")) { target.addAttribute("rowstyle", rowStyle); } @@ -4602,6 +4602,8 @@ public class Table extends AbstractSelect implements Action.Container, /** * Called by Table when a cell (and row) is painted. * + * @param source + * the source Table * @param itemId * The itemId of the painted cell * @param propertyId @@ -4610,7 +4612,8 @@ public class Table extends AbstractSelect implements Action.Container, * name will be v-table-cell-content-[style name], or * v-table-row-[style name] for rows) */ - public abstract String getStyle(Object itemId, Object propertyId); + public abstract String getStyle(Table source, Object itemId, + Object propertyId); } @Override -- cgit v1.2.3