]> source.dussan.org Git - vaadin-framework.git/commitdiff
#7284 Simplified styleName setting
authorArtur Signell <artur.signell@itmill.com>
Fri, 12 Aug 2011 08:48:32 +0000 (08:48 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 12 Aug 2011 08:48:32 +0000 (08:48 +0000)
svn changeset:20341/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java

index 6a785ae211ce829040083a81f2cc9a6be0e032ec..3034259353cdcfe168da3cbdc02d79230487a55d 100644 (file)
@@ -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);
         }
     }