From 67c3d0534594585a9631ac3f00258c133a54d975 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 26 Nov 2014 23:02:23 +0200 Subject: Allow setting style names for header and footer cells (#7225) Change-Id: Ieb8f5b36466a2d579e9c82f16613f6bc8952c831 --- server/src/com/vaadin/ui/Grid.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'server/src') diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index 715190e293..5afb0038e0 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -470,6 +470,27 @@ public class Grid extends AbstractComponent implements SelectionChangeNotifier, cellState.type = GridStaticCellType.WIDGET; row.section.markAsDirty(); } + + /** + * Returns the custom style name for this cell. + * + * @return the style name or null if no style name has been set + */ + public String getStyleName() { + return cellState.styleName; + } + + /** + * Sets a custom style name for this cell. + * + * @param styleName + * the style name to set + */ + public void setStyleName(String styleName) { + cellState.styleName = styleName; + row.section.markAsDirty(); + } + } protected Grid grid; -- cgit v1.2.3