]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed duplicate method toggleStyleName (replaced by
authorJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 13:03:53 +0000 (16:03 +0300)
committerJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 13:03:53 +0000 (16:03 +0300)
setStyleName(String,Boolean) )

client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java

index e04ef93444ae3fcf651d8d03fc7c8a1814514dbf..4df4ce65247138556cde6f1721eaaa610cad6301 100644 (file)
@@ -541,19 +541,11 @@ public class VBoxLayout extends FlowPanel {
         }
     }
 
-    private void toggleStyleName(String name, boolean enabled) {
-        if (enabled) {
-            addStyleName(name);
-        } else {
-            removeStyleName(name);
-        }
-    }
-
     void setMargin(MarginInfo marginInfo) {
-        toggleStyleName("v-margin-top", marginInfo.hasTop());
-        toggleStyleName("v-margin-right", marginInfo.hasRight());
-        toggleStyleName("v-margin-bottom", marginInfo.hasBottom());
-        toggleStyleName("v-margin-left", marginInfo.hasLeft());
+        setStyleName("v-margin-top", marginInfo.hasTop());
+        setStyleName("v-margin-right", marginInfo.hasRight());
+        setStyleName("v-margin-bottom", marginInfo.hasBottom());
+        setStyleName("v-margin-left", marginInfo.hasLeft());
     }
 
     protected void setSpacing(boolean spacingEnabled) {