From c00921a2ff94915a425569a60c7651e702b3d2c6 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 1 Dec 2014 21:14:18 +0200 Subject: Allow setting style name for header/footer rows (#7225) Change-Id: I798e26b0a734c3c460b4e458d04332c7a3b599fc --- server/src/com/vaadin/ui/Grid.java | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index c617917555..04b0e65a1e 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -357,6 +357,27 @@ public class Grid extends AbstractComponent implements SelectionChangeNotifier, } return null; } + + /** + * Returns the custom style name for this row. + * + * @return the style name or null if no style name has been set + */ + public String getStyleName() { + return getRowState().styleName; + } + + /** + * Sets a custom style name for this row. + * + * @param styleName + * the style name to set or null to not use any style + * name + */ + public void setStyleName(String styleName) { + getRowState().styleName = styleName; + } + } /** @@ -485,7 +506,8 @@ public class Grid extends AbstractComponent implements SelectionChangeNotifier, * Sets a custom style name for this cell. * * @param styleName - * the style name to set + * the style name to set or null to not use any style + * name */ public void setStyleName(String styleName) { cellState.styleName = styleName; -- cgit v1.2.3