summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-05-31 09:15:27 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-05-31 09:15:27 +0000
commit35973ebe675b8914f35e672b95b07be988fdc9e5 (patch)
tree7b30de738c4b7d3eff9edb8d6d80371ecd25c71f /src/com/vaadin
parentee7526e0876fbe5e418331e3883ad5b9a1d7a828 (diff)
downloadvaadin-framework-35973ebe675b8914f35e672b95b07be988fdc9e5.tar.gz
vaadin-framework-35973ebe675b8914f35e672b95b07be988fdc9e5.zip
#7495 Inverted the server-side API naming (eg. setColumnNoncollapsible -> setColumnCollapsible). No other change in semantics.
svn changeset:23861/svn branch:6.8
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/ui/Table.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index 564aa24991..73fe9679d5 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -1187,31 +1187,38 @@ public class Table extends AbstractSelect implements Action.Container,
}
/**
- * Sets whether a column can be collapsed or not.
+ * Sets whether the given column is collapsible. Note that collapsible
+ * columns can only be actually collapsed (via UI or with
+ * {@link #setColumnCollapsed(Object, boolean) setColumnCollapsed()}) if
+ * {@link #isColumnCollapsingAllowed()} is true. By default all columns are
+ * collapsible.
*
* @param propertyId
* the propertyID identifying the column.
* @param collapsible
- * the desired collapsibleness
+ * true if the column should be collapsible, false otherwise.
*/
- public void setColumnNoncollapsible(Object propertyId,
- boolean noncollapsible) {
- if (noncollapsible) {
+ public void setColumnCollapsible(Object propertyId, boolean collapsible) {
+ if (collapsible) {
+ noncollapsibleColumns.remove(propertyId);
+ } else {
noncollapsibleColumns.add(propertyId);
collapsedColumns.remove(propertyId);
- } else {
- noncollapsibleColumns.remove(propertyId);
}
refreshRowCache();
}
/**
- * Checks if the column can be collapsed.
+ * Checks if the given column is collapsible. Note that even if this method
+ * returns <code>true</code>, the column can only be actually collapsed (via
+ * UI or with {@link #setColumnCollapsed(Object, boolean)
+ * setColumnCollapsed()}) if {@link #isColumnCollapsingAllowed()} is also
+ * true.
*
* @return true if the column can be collapsed; false otherwise.
*/
- public boolean isColumnNoncollapsible(Object propertyId) {
- return noncollapsibleColumns.contains(propertyId);
+ public boolean isColumnCollapsible(Object propertyId) {
+ return !noncollapsibleColumns.contains(propertyId);
}
/**