diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/Table.java | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 3edfe7845f..fa7f6cfc01 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -65,6 +65,7 @@ import com.vaadin.server.PaintTarget; import com.vaadin.server.Resource; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.MultiSelectMode; +import com.vaadin.shared.ui.table.CollapseMenuContent; import com.vaadin.shared.ui.table.TableConstants; import com.vaadin.shared.ui.table.TableConstants.Section; import com.vaadin.shared.ui.table.TableServerRpc; @@ -6469,7 +6470,12 @@ public class Table extends AbstractSelect implements Action.Container, @Override protected TableState getState() { - return (TableState) super.getState(); + return getState(true); + } + + @Override + protected TableState getState(boolean markAsDirty) { + return (TableState) super.getState(markAsDirty); } private final Logger getLogger() { @@ -6492,4 +6498,30 @@ public class Table extends AbstractSelect implements Action.Container, public ChildMeasurementHint getChildMeasurementHint() { return childMeasurementHint; } + + /** + * Sets whether only collapsible columns should be shown to the user in the + * column collapse menu. The default is + * {@link CollapseMenuContent#ALL_COLUMNS}. + * + * + * @since + * @param content + * the desired collapsible menu content setting + */ + public void setCollapseMenuContent(CollapseMenuContent content) { + getState().collapseMenuContent = content; + } + + /** + * Checks whether only collapsible columns are shown to the user in the + * column collapse menu. The default is + * {@link CollapseMenuContent#ALL_COLUMNS} . + * + * @since + * @return the current collapsible menu content setting + */ + public CollapseMenuContent getCollapseMenuContent() { + return getState(false).collapseMenuContent; + } } |