summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/CheckBox.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-18 12:07:41 +0200
committerVaadin Code Review <review@vaadin.com>2014-12-18 10:44:05 +0000
commitdac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2 (patch)
tree576671206119756f3fb4af7e4fe8c0c584d8c9fd /server/src/com/vaadin/ui/CheckBox.java
parent399b62d0ecd593efbb5563db957017ef43a3945c (diff)
downloadvaadin-framework-dac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2.tar.gz
vaadin-framework-dac2d7ec49d0213ddd2977b9a3dc05c8366ff6b2.zip
Fix inconsistencies in CheckBox clear and isEmpty (#14755)
Change-Id: I566257d3a4db15973f76a5a70adb095bd7203918
Diffstat (limited to 'server/src/com/vaadin/ui/CheckBox.java')
-rw-r--r--server/src/com/vaadin/ui/CheckBox.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java
index e26e5c4750..e98a2b61b9 100644
--- a/server/src/com/vaadin/ui/CheckBox.java
+++ b/server/src/com/vaadin/ui/CheckBox.java
@@ -253,4 +253,15 @@ public class CheckBox extends AbstractField<Boolean> {
def.getValue(), Boolean.class);
}
+ @Override
+ public void clear() {
+ setValue(Boolean.FALSE);
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return getValue() == null || getValue().equals(Boolean.FALSE);
+
+ }
+
}