diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-09-18 14:26:50 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2015-12-16 07:18:37 +0000 |
commit | 3aff803172dab49a6e0ac694b3b3d687dc7e976c (patch) | |
tree | 469ac91e564baf88852bb73460194b07cf381134 /server | |
parent | 61e83653330399f6ead49f74277410e43368a2cb (diff) | |
download | vaadin-framework-3aff803172dab49a6e0ac694b3b3d687dc7e976c.tar.gz vaadin-framework-3aff803172dab49a6e0ac694b3b3d687dc7e976c.zip |
Make it possible to only show collapsible columns in menu (#9811)
Change-Id: I52cd2648d305f44d5688e7a2fcd222e6b167b97b
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; + } } |