]> source.dussan.org Git - vaadin-framework.git/commitdiff
Code cleanup: Use constant instead of "v-disabled" string
authorArtur Signell <artur.signell@itmill.com>
Mon, 18 Jul 2011 13:53:35 +0000 (13:53 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 18 Jul 2011 13:53:35 +0000 (13:53 +0000)
svn changeset:19823/svn branch:6.7

src/com/vaadin/terminal/gwt/client/ui/VButton.java
src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java
src/com/vaadin/terminal/gwt/client/ui/VOptionGroup.java

index 1cb2a92e2e15bc44b8449a45b3292025820514f7..bde6320b322ffbe254548f20395f1e24bdc841a7 100644 (file)
@@ -419,12 +419,12 @@ public class VButton extends FocusWidget implements Paintable, ClickHandler,
                 Accessibility.removeState(getElement(),
                         Accessibility.STATE_PRESSED);
                 super.setTabIndex(-1);
-                addStyleName("v-disabled");
+                addStyleName(ApplicationConnection.DISABLED_CLASSNAME);
             } else {
                 Accessibility.setState(getElement(),
                         Accessibility.STATE_PRESSED, "false");
                 super.setTabIndex(tabIndex);
-                removeStyleName("v-disabled");
+                removeStyleName(ApplicationConnection.DISABLED_CLASSNAME);
             }
         }
     }
index c1d9f56a4fe69eef01de04e8306b2b307c879e62..f4691a3f27b529ef7770bfe7656e211e5009d0d7 100644 (file)
@@ -69,7 +69,7 @@ public class VFormLayout extends SimplePanel implements Container {
         }
 
         if (uidl.hasAttribute("disabled")) {
-            styles.add("v-disabled");
+            styles.add(ApplicationConnection.DISABLED_CLASSNAME);
         }
 
         return styles.toArray(new String[styles.size()]);
@@ -339,7 +339,8 @@ public class VFormLayout extends SimplePanel implements Container {
         public void updateCaption(UIDL uidl) {
             setVisible(!uidl.getBooleanAttribute("invisible"));
 
-            setStyleName(getElement(), "v-disabled",
+            setStyleName(getElement(),
+                    ApplicationConnection.DISABLED_CLASSNAME,
                     uidl.hasAttribute("disabled"));
 
             boolean isEmpty = true;
index b6ae9cca1a192828934ea9a3bfb51d8d37a664b1..51702cdf8a9c8859c0098eb58221f53c00e3ff64 100644 (file)
@@ -113,7 +113,8 @@ public class VOptionGroup extends VOptionGroupBase implements FocusHandler,
             boolean enabled = !opUidl.getBooleanAttribute("disabled")\r
                     && !isReadonly() && !isDisabled();\r
             op.setEnabled(enabled);\r
-            setStyleName(op.getElement(), "v-disabled", !enabled);\r
+            setStyleName(op.getElement(),\r
+                    ApplicationConnection.DISABLED_CLASSNAME, !enabled);\r
             op.addClickHandler(this);\r
             optionsToKeys.put(op, opUidl.getStringAttribute("key"));\r
             panel.add(op);\r