summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2015-04-16 09:50:30 +0300
committerPekka Hyvönen <pekka@vaadin.com>2015-04-16 09:50:30 +0300
commit4c8ac1b008a9221ecd9e9133dd598435ae4dd8fd (patch)
tree17d3753921227d281c0aa6b76156aa865e1b6ae1
parent8a6c260a6a59a412227366d02e5cbce4108b2fd5 (diff)
downloadvaadin-framework-4c8ac1b008a9221ecd9e9133dd598435ae4dd8fd.tar.gz
vaadin-framework-4c8ac1b008a9221ecd9e9133dd598435ae4dd8fd.zip
Grid.Column setHidable and setHidden return the Column #17478
Change-Id: I720b66d14a151964cf071deee380704c73f88744
-rw-r--r--server/src/com/vaadin/ui/Grid.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java
index 1d7eac7b3c..ed526bc63c 100644
--- a/server/src/com/vaadin/ui/Grid.java
+++ b/server/src/com/vaadin/ui/Grid.java
@@ -3117,13 +3117,15 @@ public class Grid extends AbstractComponent implements SelectionNotifier,
* @param hidden
* <code>true</code> to hide the column, <code>false</code>
* to show
+ * @return this column
*/
- public void setHidden(boolean hidden) {
+ public Column setHidden(boolean hidden) {
if (hidden != getState().hidden) {
getState().hidden = hidden;
grid.markAsDirty();
grid.fireColumnVisibilityChangeEvent(this, hidden, false);
}
+ return this;
}
/**
@@ -3148,10 +3150,14 @@ public class Grid extends AbstractComponent implements SelectionNotifier,
* @param hidable
* <code>true</code> iff the column may be hidable by the
* user via UI interaction
+ * @return this column
*/
- public void setHidable(boolean hidable) {
- getState().hidable = hidable;
- grid.markAsDirty();
+ public Column setHidable(boolean hidable) {
+ if (hidable != getState().hidable) {
+ getState().hidable = hidable;
+ grid.markAsDirty();
+ }
+ return this;
}
/**