summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/com/vaadin/client/ui/orderedlayout/VBoxLayout.java16
1 files 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) {