aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/CheckBox.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2011-11-28 13:39:03 +0200
committerArtur Signell <artur@vaadin.com>2011-11-28 13:39:03 +0200
commite8ae3d54d9c5f984c34813240d069aa613875d6d (patch)
treebd8061c790bb910b1a93214fe364caed1748fa58 /src/com/vaadin/ui/CheckBox.java
parent3053cf8f876e4bac0bfce4e90ad7301ffc3f27b8 (diff)
downloadvaadin-framework-e8ae3d54d9c5f984c34813240d069aa613875d6d.tar.gz
vaadin-framework-e8ae3d54d9c5f984c34813240d069aa613875d6d.zip
Default value for a CheckBox is now false and not null. Removed
old booleanValue as getValue() returns true/false now for all basic cases
Diffstat (limited to 'src/com/vaadin/ui/CheckBox.java')
-rw-r--r--src/com/vaadin/ui/CheckBox.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/com/vaadin/ui/CheckBox.java b/src/com/vaadin/ui/CheckBox.java
index 358e2a62c6..250ab5f095 100644
--- a/src/com/vaadin/ui/CheckBox.java
+++ b/src/com/vaadin/ui/CheckBox.java
@@ -21,6 +21,7 @@ public class CheckBox extends AbstractField<Boolean> {
* Creates a new checkbox.
*/
public CheckBox() {
+ setValue(Boolean.FALSE);
}
/**
@@ -68,7 +69,7 @@ public class CheckBox extends AbstractField<Boolean> {
public void paintContent(PaintTarget target) throws PaintException {
super.paintContent(target);
- target.addVariable(this, VCheckBox.VARIABLE_STATE, booleanValue());
+ target.addVariable(this, VCheckBox.VARIABLE_STATE, getValue());
}
@Override
@@ -114,19 +115,4 @@ public class CheckBox extends AbstractField<Boolean> {
}
- /**
- * Get the boolean value of the checkbox state.
- *
- * @return True iff the checkbox is checked.
- * @deprecated in Vaadin 7.0.0. Retained to ease migration from Vaadin 6
- */
- @Deprecated
- public boolean booleanValue() {
- // FIXME: How should null really be handled? A default converter that
- // converts it to false? The only UI values supported are true and
- // false.
- Boolean value = getValue();
- return (null == value) ? false : value.booleanValue();
- }
-
}