diff options
author | John Ahlroos <john@vaadin.com> | 2012-10-16 14:07:40 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-10-17 08:52:28 +0300 |
commit | 7bacf1abbd74b0b4ef47cc6033671198fd8f5e4b (patch) | |
tree | 8e4b3ea810d09f3aef8543b51e7d2ce64aa3761f /client/src | |
parent | 754cf6a33685507cc3a7d5afeb761f227df66fb8 (diff) | |
download | vaadin-framework-7bacf1abbd74b0b4ef47cc6033671198fd8f5e4b.tar.gz vaadin-framework-7bacf1abbd74b0b4ef47cc6033671198fd8f5e4b.zip |
Fixed primary stylename handling for ListSelect #9907
Change-Id: Ia717af9a2dd973f16366ee527bf8f3c221fd4403
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/listselect/VListSelect.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/listselect/VListSelect.java b/client/src/com/vaadin/client/ui/listselect/VListSelect.java index 520995012e..d8d0a43378 100644 --- a/client/src/com/vaadin/client/ui/listselect/VListSelect.java +++ b/client/src/com/vaadin/client/ui/listselect/VListSelect.java @@ -39,8 +39,25 @@ public class VListSelect extends VOptionGroupBase { select = getOptionsContainer(); select.addChangeHandler(this); select.addClickHandler(this); - select.setStyleName(CLASSNAME + "-select"); select.setVisibleItemCount(VISIBLE_COUNT); + setStyleName(CLASSNAME); + } + + @Override + public void setStyleName(String style) { + super.setStyleName(style); + updateStyleNames(); + } + + @Override + public void setStylePrimaryName(String style) { + super.setStylePrimaryName(style); + updateStyleNames(); + } + + protected void updateStyleNames() { + container.setStyleName(getStylePrimaryName()); + select.setStyleName(getStylePrimaryName() + "-select"); } protected ListBox getOptionsContainer() { |