diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-07-04 07:07:17 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2008-07-04 07:07:17 +0000 |
commit | 1da5d9f4e2df6a8f678ed9fe221e7c15f15ca57d (patch) | |
tree | 3b11a0d98382bf510365f750ca05d9cec37e0974 /src/com/itmill/toolkit/ui/Button.java | |
parent | c8b4dcc6eea39105ad10bafdca860a740688e3f8 (diff) | |
download | vaadin-framework-1da5d9f4e2df6a8f678ed9fe221e7c15f15ca57d.tar.gz vaadin-framework-1da5d9f4e2df6a8f678ed9fe221e7c15f15ca57d.zip |
Fixes #1906 : Button should provide easy to use method for getting the boolean state of the checkbox
svn changeset:5052/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/Button.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/Button.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/ui/Button.java b/src/com/itmill/toolkit/ui/Button.java index 0af982268f..3184ec554d 100644 --- a/src/com/itmill/toolkit/ui/Button.java +++ b/src/com/itmill/toolkit/ui/Button.java @@ -152,7 +152,7 @@ public class Button extends AbstractField { * @param variables */ public void changeVariables(Object source, Map variables) { - super.changeVariables(source, variables); + super.changeVariables(source, variables); if (isReadOnly()) { System.err.println("Button: ignoring variable change for" + " read-only component, caption=" + getCaption()); @@ -210,6 +210,15 @@ public class Button extends AbstractField { } /** + * Get the boolean value of the button state. + * + * @return True iff the button is pressed down or checked. + */ + boolean booleanValue() { + return ((Boolean) getValue()).booleanValue(); + } + + /** * Sets immediate mode. Push buttons can not be set in non-immediate mode. * * @see com.itmill.toolkit.ui.AbstractComponent#setImmediate(boolean) |