From 223fc1421dea2e1fd6c80ce4b859c17ca0a428e9 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Wed, 5 Sep 2012 16:03:53 +0300 Subject: [PATCH] Removed duplicate method toggleStyleName (replaced by setStyleName(String,Boolean) ) --- .../client/ui/orderedlayout/VBoxLayout.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java index e04ef93444..4df4ce6524 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java @@ -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) { -- 2.39.5