summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-16 11:45:11 +0200
committerArtur Signell <artur@vaadin.com>2012-03-16 11:45:11 +0200
commit2b5941cdc1435b8915ba28cbf891cb1ad32e9314 (patch)
treeeeb473e114bcdb050d3ea4e750bed5e6ccfda9ca /src/com/vaadin/ui/AbstractComponent.java
parent8eb477d719406639ff2bb7b0312132cb7d9da95b (diff)
downloadvaadin-framework-2b5941cdc1435b8915ba28cbf891cb1ad32e9314.tar.gz
vaadin-framework-2b5941cdc1435b8915ba28cbf891cb1ad32e9314.zip
Better support for adding multiple styles through addStyleName
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r--src/com/vaadin/ui/AbstractComponent.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java
index 4c49dc34d3..e2e8a9693e 100644
--- a/src/com/vaadin/ui/AbstractComponent.java
+++ b/src/com/vaadin/ui/AbstractComponent.java
@@ -241,6 +241,14 @@ public abstract class AbstractComponent implements Component, MethodEventSource
if (style == null || "".equals(style)) {
return;
}
+ if (style.contains(" ")) {
+ // Split space separated style names and add them one by one.
+ for (String realStyle : style.split(" ")) {
+ addStyleName(realStyle);
+ }
+ return;
+ }
+
if (getState().getStyles() == null) {
getState().setStyles(new ArrayList<String>());
}