summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-05 16:03:53 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-05 16:03:53 +0300
commit223fc1421dea2e1fd6c80ce4b859c17ca0a428e9 (patch)
treed597efcacbedde49cf5205d67038a3f75b92043b
parent7671871725ce03c356de17ad4ce58a7bfba0f7d6 (diff)
downloadvaadin-framework-223fc1421dea2e1fd6c80ce4b859c17ca0a428e9.tar.gz
vaadin-framework-223fc1421dea2e1fd6c80ce4b859c17ca0a428e9.zip
Removed duplicate method toggleStyleName (replaced by
setStyleName(String,Boolean) )
-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) {