aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/data/SelectionModel.java
diff options
context:
space:
mode:
authorDenis <denis@vaadin.com>2017-01-13 12:37:54 +0200
committerPekka Hyvönen <pekka@vaadin.com>2017-01-13 12:37:54 +0200
commit40cb64fbab832279ab13bd853bf1096da92abc39 (patch)
treecf1660013f272fc3252cb4593277f827386a3955 /server/src/main/java/com/vaadin/data/SelectionModel.java
parent8fca887996e063470379dcf3b47d6bcff3c9839c (diff)
downloadvaadin-framework-40cb64fbab832279ab13bd853bf1096da92abc39.tar.gz
vaadin-framework-40cb64fbab832279ab13bd853bf1096da92abc39.zip
Add "deselect allowed" feature to the Grid. (#8227)
* Add "deselect allowed" feature to the Grid. Fixes #8149
Diffstat (limited to 'server/src/main/java/com/vaadin/data/SelectionModel.java')
-rw-r--r--server/src/main/java/com/vaadin/data/SelectionModel.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/data/SelectionModel.java b/server/src/main/java/com/vaadin/data/SelectionModel.java
index 29c32c7698..397e2a1557 100644
--- a/server/src/main/java/com/vaadin/data/SelectionModel.java
+++ b/server/src/main/java/com/vaadin/data/SelectionModel.java
@@ -103,6 +103,26 @@ public interface SelectionModel<T> extends Serializable {
default Optional<T> getFirstSelectedItem() {
return getSelectedItem();
}
+
+ /**
+ * Sets whether it's allowed to deselect the selected row through the
+ * UI. Deselection is allowed by default.
+ *
+ * @param deselectAllowed
+ * <code>true</code> if the selected row can be deselected
+ * without selecting another row instead; otherwise
+ * <code>false</code>.
+ */
+ public void setDeselectAllowed(boolean deselectAllowed);
+
+ /**
+ * Gets whether it's allowed to deselect the selected row through the
+ * UI.
+ *
+ * @return <code>true</code> if deselection is allowed; otherwise
+ * <code>false</code>
+ */
+ public boolean isDeselectAllowed();
}
/**