diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2015-03-13 14:39:23 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2015-03-13 13:18:01 +0000 |
commit | 8ece5b005a8edb5c50d06c0ac9758044f7e8b877 (patch) | |
tree | 48ef27d691a4693271f321155b0d044c28a266b5 /client/src | |
parent | 54d6480a3cbd6d721dc119a7f6c5c029b7dcefea (diff) | |
download | vaadin-framework-8ece5b005a8edb5c50d06c0ac9758044f7e8b877.tar.gz vaadin-framework-8ece5b005a8edb5c50d06c0ac9758044f7e8b877.zip |
Client side API for setting a grid column hideable (#17023)
Change-Id: I389d603210744ea02846a00ab893188b7953145f
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Grid.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 7e08348da0..f7744d52ae 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -3385,6 +3385,8 @@ public class Grid<T> extends ResizeComposite implements private boolean hidden = false; + private boolean hideable = false; + private String headerCaption = ""; private double minimumWidthPx = GridConstants.DEFAULT_MIN_WIDTH; @@ -3689,6 +3691,38 @@ public class Grid<T> extends ResizeComposite implements return hidden; } + /** + * Set whether it is possible for the user to hide this column or not. + * Default is {@code false}. + * <p> + * <em>Note:</em> it is still possible to hide the column + * programmatically using {@link #setHidden(boolean)}. + * + * @since + * @param hideable + * <code>true</code> if the user can hide this column, + * <code>false</code> if not + */ + public void setHideable(boolean hideable) { + this.hideable = hideable; + // TODO update whether sidebar/popup can be opened + } + + /** + * Is it possible for the the user to hide this column. Default is + * {@code false}. + * <p> + * <em>Note:</em> the column can be programmatically hidden using + * {@link #setHidden(boolean)} regardless of the returned value. + * + * @since + * @return <code>true</code> if the user can hide the column, + * <code>false</code> if not + */ + public boolean isHideable() { + return hideable; + } + @Override public String toString() { String details = ""; |