diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-08-12 08:48:32 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-08-12 08:48:32 +0000 |
commit | 2a0bf9b8b613addca8a35e7bb6df4c9bcef62917 (patch) | |
tree | 0ef1a96846141a4a66b3407d27f3f54283767857 | |
parent | 0284ab0a00f11293fcd3615dfef685a906884419 (diff) | |
download | vaadin-framework-2a0bf9b8b613addca8a35e7bb6df4c9bcef62917.tar.gz vaadin-framework-2a0bf9b8b613addca8a35e7bb6df4c9bcef62917.zip |
#7284 Simplified styleName setting
svn changeset:20341/svn branch:6.7
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java index 6a785ae211..3034259353 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java @@ -231,11 +231,7 @@ public class VNativeButton extends Button implements Paintable, ClickHandler, public void setEnabled(boolean enabled) { if (isEnabled() != enabled) { super.setEnabled(enabled); - if (enabled) { - removeStyleName(ApplicationConnection.DISABLED_CLASSNAME); - } else { - addStyleName(ApplicationConnection.DISABLED_CLASSNAME); - } + setStyleName(ApplicationConnection.DISABLED_CLASSNAME, !enabled); } } |