aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/com/vaadin/client/widgets/Grid.java34
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 = "";