diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-04 09:38:38 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-04 09:39:00 +0300 |
commit | 52c4b1905e311f72fdf8080a1917e87c30355a61 (patch) | |
tree | ea6550035a87b957f2ede7e37ca0881b2237ce74 /server/src/com/vaadin/ui/Table.java | |
parent | 112572a700c288fc49df60ea23a2ade7c51c5165 (diff) | |
download | vaadin-framework-52c4b1905e311f72fdf8080a1917e87c30355a61.tar.gz vaadin-framework-52c4b1905e311f72fdf8080a1917e87c30355a61.zip |
ItemStyleGenerator.getStyle now includes source component (#5822)
Diffstat (limited to 'server/src/com/vaadin/ui/Table.java')
-rw-r--r-- | server/src/com/vaadin/ui/Table.java | 11 |
1 files changed, 7 insertions, 4 deletions
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 |