diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/VScrollTable.java | 19 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/table/TableConnector.java | 1 |
2 files changed, 16 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index 5bd6ed390d..74966d6b26 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -104,6 +104,7 @@ import com.vaadin.client.ui.dd.VTransferable; import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.VerticalDropLocation; +import com.vaadin.shared.ui.table.CollapseMenuContent; import com.vaadin.shared.ui.table.TableConstants; /** @@ -4018,10 +4019,17 @@ public class VScrollTable extends FlowPanel implements HasWidgets, cols[i++] = it.next(); } } - final Action[] actions = new Action[cols.length]; + List<Action> actions = new ArrayList<Action>(cols.length); for (int i = 0; i < cols.length; i++) { final String cid = (String) cols[i]; + boolean noncollapsible = noncollapsibleColumns.contains(cid); + + if (noncollapsible + && collapsibleMenuContent == CollapseMenuContent.COLLAPSIBLE_COLUMNS) { + continue; + } + final HeaderCell c = getHeaderCell(cid); final VisibleColumnAction a = new VisibleColumnAction( c.getColKey()); @@ -4029,12 +4037,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (!c.isEnabled()) { a.setCollapsed(true); } - if (noncollapsibleColumns.contains(cid)) { + if (noncollapsible) { a.setNoncollapsible(true); } - actions[i] = a; + actions.add(a); } - return actions; + return actions.toArray(new Action[actions.size()]); } @Override @@ -7205,6 +7213,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, /** For internal use only. May be removed or replaced in the future. */ public boolean multiselectPending; + /** For internal use only. May be removed or replaced in the future. */ + public CollapseMenuContent collapsibleMenuContent; + /** * @return border top + border bottom of the scrollable area of table */ diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java index cdd9397976..a554b9335c 100644 --- a/client/src/com/vaadin/client/ui/table/TableConnector.java +++ b/client/src/com/vaadin/client/ui/table/TableConnector.java @@ -395,6 +395,7 @@ public class TableConnector extends AbstractFieldConnector implements getWidget().rendering = false; getWidget().headerChangedDuringUpdate = false; + getWidget().collapsibleMenuContent = getState().collapseMenuContent; } @Override |